簡體   English   中英

pyinstaller exe無法關閉

[英]pyinstaller exe won't close

pyInstaller創建的所有exe文件都有問題。 它可以在控制台中運行的用Python 2.7編寫的簡單hello world示例中重現。 問題是腳本可以運行(似乎可以正常運行),但是執行后,“父”外殼(我從中運行exe的cmd)就死了,短短重啟PC便無法關閉它(cmd或total)統帥)。

因此,父線程只是在運行我的exe時掛起。 我想知道是否以某種方式破壞了pyInstaller或pywin32的安裝,使用了錯誤的版本等? 另外,一旦我使exe腳本出錯,該exe便會運行並退出並顯示典型的python調試打印信息(但父腳本這次沒有掛起)。

編輯:自從我重新安裝了python,easy-installer,pywin32,pyinstaller之后,仍然遇到相同的問題。 這次我從以下網址下載了x86版本的所有內容(是鏈接,但需要發布10個代表):

Pythonez-setup鏈接在這里Pywin32PyInstaller鏈接在這里

該腳本很簡單:

print "Hello World"

生成exe時的pyInstaller輸出:

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

我的系統是i5(64位)Windows 7。

如果遇到問題,請嘗試重新安裝該程序。 或嘗試下載更新版本的Python。

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

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

我不知道我怎么會錯過它,而僅僅是我的Avast防病毒程序干擾了。 盾牌之一是使我所有的python exe在完成時“停止”其調用父窗口。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM