Reputation: 3677
I have been using pyinstaller with python2 with no problems
Now I have upgraded to python 3 I am having problems
I am on Windows 7 with Python 3.6 and pyinstaller 3.3
When I run pyi-biuld, the process completes and builds a dist directory. The exe starts up and then crashes.
I note that there is a python27.dll in the dist directory
Is there something I can do to trace what is happening?
This is the pyi-build output for a minimal program
(wenv35) C:\test_pyi>pyi-build foo.spec
46 INFO: Testing for ability to set icons, version resources...
92 INFO: ... resource update available
108 INFO: UPX is not available.
123 INFO: Processing hook hook-os
279 INFO: Processing hook hook-time
296 INFO: Processing hook hook-cPickle
389 INFO: Processing hook hook-_sre
546 INFO: Processing hook hook-cStringIO
669 INFO: Processing hook hook-encodings
701 INFO: Processing hook hook-codecs
1184 INFO: Extending PYTHONPATH with C:\test_pyi
1200 INFO: checking Analysis
1263 INFO: checking PYZ
1293 INFO: checking PKG
1309 INFO: building because C:\test_pyi\build\foo\foo.exe.manifest changed
1309 INFO: building PKG (CArchive) out00-PKG.pkg
1340 INFO: checking EXE
1340 INFO: rebuilding out00-EXE.toc because foo.exe missing
1340 INFO: building EXE from out00-EXE.toc
1340 INFO: Appending archive to EXE C:\test_pyi\dist\foo.exe
1761 INFO: checking COLLECT
1761 INFO: building COLLECT out00-COLLECT.toc
I am now getting a Fatal error dialog:
Error loading Python DLL: C:\ ......\python27.dll (error code 126)
Upvotes: 0
Views: 1250
Reputation: 3889
It appears that Python 3.6 is not yet supported by PyInstaller: https://github.com/pyinstaller/pyinstaller/issues/2286
Generally, this would have resulted in an error when compiling, but I imagine that if you have both versions of Python installed on your computer, it is finding 2.7 somehow and packaging that up, which results in your exe not running properly (mismatch between your python 3.6 code and the python 2.7 dll)
You may have to downgrade to 3.5 for this...
Upvotes: 1