Dll loading error with pyinstaller + ctypes.cdll

Heads up! You've already completed this tutorial.

He_Han | 2021-01-14 08:31:32 UTC | #1

When I try to running exe file which created with pyinstaller+pyqt5, always has error messages like

Traceback (most recent call last):

File "PyInstaller\loader\pyiboot01_bootstrap.py", line 144, in init

File "ctypes__init__.py", line 373, in init

FileNotFoundError: Could not find module './FSetAccessibility.dll' (or one of its dependencies). Try using the full path with constructor syntax.

But when I run the program with IDE, or run the exe file in my personal notebook, it is running with no any error.. I already tried (https://github.com/pyinstaller/pyinstaller/wiki/Recipe-Win-Load-External-DLL), still not working...

Create GUI Applications with Python & Qt6 by Martin Fitzpatrick — (PyQt6 Edition) The hands-on guide to making apps with Python — Over 10,000 copies sold!

More info Get the book

please help... OTL


martin | 2021-01-21 15:23:48 UTC | #2

Hi @He_Han

Packaging Python Applications with PyInstaller by Martin Fitzpatrick — This step-by-step guide walks you through packaging your own Python applications from simple examples to complete installers and signed executables.

More info Get the book

That's an unusual error -- when I Google it, all I find is this post :D

Do you have any idea what FSetAccessibility.dll is ? These kinds of errors not happening on your own computer are because you have that file available (probably under /Windows/System/ or /Windows/System32) but other computers do not.

We either need to figure out how to package that file with your software, or figure out what we need to change so that file isn't needed.

1:1 Coaching & Tutoring for your Python GUIs project
Martin Fitzpatrick Python GUIs Coaching & Training
60 mins ($195) Book Now

1:1 Python GUIs Coaching & Training

Comprehensive code reviewBugfixes & improvements • Maintainability advice and architecture improvements • Design and usability assessment • Suggestions and tips to expand your knowledgePackaging and distribution help for Windows, Mac & Linux • Find out more.


Well done, you've finished this tutorial! Mark As Complete
[[ user.completed.length ]] completed [[ user.streak+1 ]] day streak
Martin Fitzpatrick

Dll loading error with pyinstaller + ctypes.cdll was written by Martin Fitzpatrick .

Martin Fitzpatrick has been developing Python/Qt apps for 8 years. Building desktop applications to make data-analysis tools more user-friendly, Python was the obvious choice. Starting with Tk, later moving to wxWidgets and finally adopting PyQt. Martin founded PythonGUIs to provide easy to follow GUI programming tutorials to the Python community. He has written a number of popular https://www.martinfitzpatrick.com/browse/books/ on the subject.