Frage

I have problems with all exe files created by pyInstaller. It's reproduceable in a simple hello world example written in python 2.7 that runs in the console. The problem is that the script runs (seems to run ok), but after the execution the "parent" shell (the cmd where I ran the exe from) dies and nothing short of a reboot of the pc will close it (cmd or total commander both).

So the parent thread just hangs running my exe's. I am wondering if I have botched the install of pyInstaller or pywin32 somehow, used the wrong version etc? Also, once I made the exe with an error in the script, the exe ran and exited with the typical python debug print (but the parent script did NOT hang this time).

Edit: I have since reinstalled python, easy-installer, pywin32, pyinstaller and still have the same problem. I downloaded everything in x86 version this time around from the following url's (was links but need 10 rep to post):

Python, ez-setup link here, Pywin32, PyInstaller link here

The script is just a simple:

print "Hello World"

The pyInstaller output when building the exe:

E:\Projects\Workspace\fileCrawler>pyinstaller --onefile hw.py
36 INFO: wrote E:\Projects\Workspace\fileCrawler\hw.spec
49 INFO: Testing for ability to set icons, version resources...
62 INFO: ... resource update available
63 INFO: UPX is not available.
82 INFO: Processing hook hook-os
181 INFO: Processing hook hook-time
184 INFO: Processing hook hook-cPickle
247 INFO: Processing hook hook-_sre
354 INFO: Processing hook hook-cStringIO
434 INFO: Processing hook hook-encodings
446 INFO: Processing hook hook-codecs
805 INFO: Extending PYTHONPATH with E:\Projects\Workspace\fileCrawler
806 INFO: checking Analysis
1194 INFO: building because C:\Python27\lib\site-packages\pyinstaller-2.1-py2.7.egg\PyInstaller\loader\_pyi_bootstrap.py changed
1196 INFO: running Analysis out00-Analysis.toc
1198 INFO: Adding Microsoft.VC90.CRT to dependent assemblies of final executable
2523 INFO: Searching for assembly x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none ...
2523 INFO: Found manifest C:\Windows\WinSxS\Manifests\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91.manifest
2526 INFO: Searching for file msvcr90.dll
2526 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91\msvcr90.dll
2526 INFO: Searching for file msvcp90.dll
2526 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91\msvcp90.dll
2528 INFO: Searching for file msvcm90.dll
2528 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91\msvcm90.dll
2594 INFO: Analyzing C:\Python27\lib\site-packages\pyinstaller-2.1-py2.7.egg\PyInstaller\loader\_pyi_bootstrap.py
2605 INFO: Processing hook hook-os
2617 INFO: Processing hook hook-site
2630 INFO: Processing hook hook-encodings
2724 INFO: Processing hook hook-time
2727 INFO: Processing hook hook-cPickle
2792 INFO: Processing hook hook-_sre
2903 INFO: Processing hook hook-cStringIO
2993 INFO: Processing hook hook-codecs
3384 INFO: Processing hook hook-pydoc
3496 INFO: Processing hook hook-email
3549 INFO: Processing hook hook-httplib
3588 INFO: Processing hook hook-email.message
3647 INFO: Analyzing C:\Python27\lib\site-packages\pyinstaller-2.1-py2.7.egg\PyInstaller\loader\pyi_importers.py
3684 INFO: Analyzing C:\Python27\lib\site-packages\pyinstaller-2.1-py2.7.egg\PyInstaller\loader\pyi_archive.py
3720 INFO: Analyzing C:\Python27\lib\site-packages\pyinstaller-2.1-py2.7.egg\PyInstaller\loader\pyi_carchive.py
3755 INFO: Analyzing C:\Python27\lib\site-packages\pyinstaller-2.1-py2.7.egg\PyInstaller\loader\pyi_os_path.py
3759 INFO: Analyzing hw.py
3760 INFO: Hidden import 'codecs' has been found otherwise
3762 INFO: Hidden import 'encodings' has been found otherwise
3762 INFO: Looking for run-time hooks
3887 INFO: Using Python library C:\Windows\system32\python27.dll
4236 INFO: Warnings written to E:\Projects\Workspace\fileCrawler\build\hw\warnhw.txt
4240 INFO: checking PYZ
4255 INFO: building because toc changed
4255 INFO: building PYZ (ZlibArchive) out00-PYZ.toc
4838 INFO: checking PKG
4855 INFO: building because E:\Projects\Workspace\fileCrawler\build\hw\out00-PYZ.pyz changed
4855 INFO: building PKG (CArchive) out00-PKG.pkg
5743 INFO: checking EXE
5744 INFO: rebuilding out00-EXE.toc because pkg is more recent
5744 INFO: building EXE from out00-EXE.toc
5759 INFO: Appending archive to EXE E:\Projects\Workspace\fileCrawler\dist\hw.exe

My system is a i5 (64 bit) Windows 7.

War es hilfreich?

Lösung

I do not fathom how I could miss it, but its simply my Avast antivirus program interfering. One of the shields was causing all my python exe's to "stall" its calling parent window upon completion.

Andere Tipps

If you're having problems then try to re-install the program. Or try to download a more recent version of Python.

https://pypi.python.org/pypi/pywin32-ctypes/0.0.1

https://pypi.python.org/pypi?%3Aaction=index

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top