Python Forum
Fail: from .py to .exe - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: Fail: from .py to .exe (/thread-9987.html)



Fail: from .py to .exe - garikhgh0 - May-08-2018

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


RE: Fail: from .py to .exe - snippsat - May-08-2018

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...


RE: Fail: from .py to .exe - garikhgh0 - May-08-2018

Please look at the screenshot.

when, moveing the python36.dll file , it gives another error "Failed to execute script : pyi_rth_multiprocessing"


RE: Fail: from .py to .exe - snippsat - May-08-2018

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



RE: Fail: from .py to .exe - garikhgh0 - May-08-2018

it worked, thanks alot :)