2010-03-19 2 views
1

Windows Vista에서 PyInstaller를 사용하여 매우 간단한 wxPython 스크립트를 실행 파일로 컴파일하려고합니다.wxPython 충돌로 PyInstaller에서 생성 된 .exe

파이썬 스크립트는 wxPython의 Hello World에 불과합니다. 프로그램을 가져야하는 기능을 추가하기 전에 Windows 실행 파일로 실행하고 실행하려고합니다. 그러나 나는 이미 붙어있다.

MSVCR90.DLL, MSVCP90.DLL 및 MSVCPM90.DLL과 관련하여 일부 루프를 뛰어 넘었습니다. Visual Studio 설치 (C : \ Program Files \ Microsoft Visual Studio 9.0 \ VC \ redist \ x86 \ Microsoft.VC90.CRT). pyInstaller 중에 대한 지침에 따라

으로, 나는 실행

Command: 
Configure.py 

Output: 
I: computing EXE_dependencies 
I: Finding TCL/TK... 
I: could not find TCL/TK 
I: testing for Zlib... 
I: ... Zlib available 
I: Testing for ability to set icons, version resources... 
I: ... resource update available 
I: Testing for Unicode support... 
I: ... Unicode available 
I: testing for UPX... 
I: ...UPX available 
I: computing PYZ dependencies... 

지금까지 너무 좋아. 나는 계속 간다.

Command: 
Makespec.py -F guitest.py 

Output: 
wrote C:\Code\PromoUSB\guitest.spec 
now run Build.py to build the executable 

마지막 명령이 있습니다.

Command: 
Build.py guitest.spec 

Output: 
checking Analysis 
building Analysis because out0.toc non existent 
running Analysis out0.toc 
Analyzing: C:\Python26\pyinstaller-1.3\support\_mountzlib.py 
Analyzing: C:\Python26\pyinstaller-1.3\support\useUnicode.py 
Analyzing: guitest.py 
Warnings written to C:\Code\PromoUSB\warnguitest.txt 
checking PYZ 
rebuilding out1.toc because out1.pyz is missing 
building PYZ out1.toc 
checking PKG 
rebuilding out3.toc because out3.pkg is missing 
building PKG out3.pkg 
checking ELFEXE 
rebuilding out2.toc because guitest.exe missing 
building ELFEXE out2.toc 

나는 결과 'guitest.exe'파일을 얻을 수 있지만, 실행시, 그것은 "단순히 충돌"... 그리고 디버그 정보가 없습니다. 이것은 표준 Windows Vista 충돌 중 하나입니다.

스크립트 자체 guitest.py는 자체적으로 정상적으로 실행됩니다. 그것은 실행 파일로만 충돌하고, 나는 완전히 잃어버린다. 내가 뭘 해봤 던지간에 관련 결과가 나오지 않아서 무엇을 찾아야할지 모르겠다.

다른 파일은 'warnguitest.txt'라는 컴파일 과정의 결과로 생성됩니다. 여기에 그 내용이 있습니다.


W: no module named posix (conditional import by os) 
W: no module named optik.__all__ (top-level import by optparse) 
W: no module named readline (delayed, conditional import by cmd) 
W: no module named readline (delayed import by pdb) 
W: no module named pwd (delayed, conditional import by posixpath) 
W: no module named org (top-level import by pickle) 
W: no module named posix (delayed, conditional import by iu) 
W: no module named fcntl (conditional import by subprocess) 
W: no module named org (top-level import by copy) 
W: no module named _emx_link (conditional import by os) 
W: no module named optik.__version__ (top-level import by optparse) 
W: no module named fcntl (top-level import by tempfile) 
W: __all__ is built strangely at line 0 - collections (C:\Python26\lib\collections.pyc) 
W: delayed exec statement detected at line 0 - collections (C:\Python26\lib\collections.pyc) 
W: delayed conditional __import__ hack detected at line 0 - doctest (C:\Python26\lib\doctest.pyc) 
W: delayed exec statement detected at line 0 - doctest (C:\Python26\lib\doctest.pyc) 
W: delayed conditional __import__ hack detected at line 0 - doctest (C:\Python26\lib\doctest.pyc) 
W: delayed __import__ hack detected at line 0 - encodings (C:\Python26\lib\encodings\__init__.pyc) 
W: __all__ is built strangely at line 0 - optparse (C:\Python26\pyinstaller-1.3\optparse.pyc) 
W: __all__ is built strangely at line 0 - dis (C:\Python26\lib\dis.pyc) 
W: delayed eval hack detected at line 0 - os (C:\Python26\lib\os.pyc) 
W: __all__ is built strangely at line 0 - __future__ (C:\Python26\lib\__future__.pyc) 
W: delayed conditional __import__ hack detected at line 0 - unittest (C:\Python26\lib\unittest.pyc) 
W: delayed conditional __import__ hack detected at line 0 - unittest (C:\Python26\lib\unittest.pyc) 
W: __all__ is built strangely at line 0 - tokenize (C:\Python26\lib\tokenize.pyc) 
W: __all__ is built strangely at line 0 - wx (C:\Python26\lib\site-packages\wx-2.8-msw-unicode\wx\__init__.pyc) 
W: __all__ is built strangely at line 0 - wx (C:\Python26\lib\site-packages\wx-2.8-msw-unicode\wx\__init__.pyc) 
W: delayed exec statement detected at line 0 - bdb (C:\Python26\lib\bdb.pyc) 
W: delayed eval hack detected at line 0 - bdb (C:\Python26\lib\bdb.pyc) 
W: delayed eval hack detected at line 0 - bdb (C:\Python26\lib\bdb.pyc) 
W: delayed __import__ hack detected at line 0 - pickle (C:\Python26\lib\pickle.pyc) 
W: delayed __import__ hack detected at line 0 - pickle (C:\Python26\lib\pickle.pyc) 
W: delayed conditional exec statement detected at line 0 - iu (C:\Python26\pyinstaller-1.3\iu.pyc) 
W: delayed conditional exec statement detected at line 0 - iu (C:\Python26\pyinstaller-1.3\iu.pyc) 
W: delayed eval hack detected at line 0 - gettext (C:\Python26\lib\gettext.pyc) 
W: delayed __import__ hack detected at line 0 - optik.option_parser (C:\Python26\pyinstaller-1.3\optik\option_parser.pyc) 
W: delayed conditional eval hack detected at line 0 - warnings (C:\Python26\lib\warnings.pyc) 
W: delayed conditional __import__ hack detected at line 0 - warnings (C:\Python26\lib\warnings.pyc) 
W: __all__ is built strangely at line 0 - optik (C:\Python26\pyinstaller-1.3\optik\__init__.pyc) 
W: delayed exec statement detected at line 0 - pdb (C:\Python26\lib\pdb.pyc) 
W: delayed conditional eval hack detected at line 0 - pdb (C:\Python26\lib\pdb.pyc) 
W: delayed eval hack detected at line 0 - pdb (C:\Python26\lib\pdb.pyc) 
W: delayed conditional eval hack detected at line 0 - pdb (C:\Python26\lib\pdb.pyc) 
W: delayed eval hack detected at line 0 - pdb (C:\Python26\lib\pdb.pyc) 

나는 그 중 어떤 것을 만들지도 모릅니다. 다시 말하지만, 제 검색은 효과가 없습니다.

+0

다소 화제가 아니지만 wxPython에서 "hello, world"앱을 작성했기 때문에 스크랩하고 PyQt로 다시 시작합니다. 문서가 더 좋고 전반적인 최종 제품이 더 좋아 보인다. –

+0

wxPython은 무료입니다. –

답변

0

PyInstaller 메일 링리스트에서이 문제에 대한 해결책을 찾았습니다. 문서화되지 않은 경우에만 매우 간단합니다.

PyInstaller는 아직 Python 2.6을 지원하지 않습니다. 해결책은 페이지에서 패치를 얻는 것입니다.이 패치는 Python 2.6을 사용하여 컴파일하려고하면 컴파일 과정에서 발견 할 수 있습니다.

감사합니다.

EDIT : 이전에 사용한 페이지는 http://svn.pyinstaller.org/branches/py26win이지만 더 이상 존재하지 않습니다.

+1

당신은 링크를 올려야합니다. – thelost

+0

아, 그래야합니다. 나는 오래 전에 그것을 잊어 버렸습니다. 팁 주셔서 감사 드리며, 다음 번에 기억하겠습니다. – Teekin

+3

링크를 좋아할만한 문제가있는 사람들이 여전히 있습니다. –

0

Windows에서 Py2exe가 더 안정적이고 사용하기 쉽다는 것을 발견했습니다. 시도해 보았습니다.