Python Forum

Full Version: Fail: from .py to .exe
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi, friends.

I have such a problem, when want to convert my python code into executable, it is being converted successfully, but does not work. when running the exe file it gives
"Error loading Python DLL 'C\user\python36.dll'. LoadLibrary: the Specified modul could not be found"

So, I use ">pyinstaller python_file.py --windowed -- clean" this method.

what is wrong, thanks in advance

>pyinstaller -F python_file.py

this gave the following error
Try:
pyinstaller --onefile --windowed --clean
If not --onefile you can not move .exe without also having python36.dll in same folder.
With option --onedir all files in that folder most move together,also .exe .dll ect...
Please look at the screenshot.

when, moveing the python36.dll file , it gives another error "Failed to execute script : pyi_rth_multiprocessing"
Look at this post,where i fix this error.
You try to build Pandas it has a lot of dependencies.
I also always build it in virtual environment when trouble shooting errors,
to have more control over dependencies.

So the fix was this added to spec file.
hiddenimports=['pandas._libs.tslibs.timedeltas'],
Then run spec file.
pyinstaller --clean your.spec
it worked, thanks alot :)