質問

私は、Windows Vista上でpyInstallerのを使用して実行ファイルに非常に単純なwxPythonのスクリプトをコンパイルしようとしています。

PythonスクリプトはwxPythonの中には何もなく、Hello Worldのではありません。私はそれまでに取得しようと、私はプログラムを持っている必要があるとの機能のいずれかを追加する前に、Windowsの実行ファイルとして実行していますよ。しかし、私はすでにこだわってます。

私は私のVisual Studioのインストールからコピーし終わったMSVCR90.DLL、MSVCP90.DLLとMSVCPM90.DLL、に関しては、いくつかのループを通じて急増しました(C:\ Program Files \ Microsoftビジュアル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)

私は一体、そのいずれかで作成するのか分かりません。ここでも、私の検索は無益されています。

役に立ちましたか?

解決 2

私はpyInstallerのメーリングリストでこの問題の解決策を見つけて、それは非常に簡単です、唯一の文書化されていない。

pyInstallerのはまだPythonの2.6をサポートしていません。解決策は、1回の試行は、Python 2.6を使用してコンパイルする場合は、今、私がしようとしていたことをコンパイルプロセスで見つけることができますページからパッチを取得することです。

しかしみんなありがとう!

EDIT: http://svn.pyinstaller.org/branches/でホストされるように使用されるページpy26win のそれはもはや存在します。

他のヒント

窓に私はあなたがそれを試してみましたが、より安定し、使用しやすいようにPy2exeを発見しました。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top