5
私は通常Windowsユーザーではありませんが、私はPythonコードからexeをビルドする必要がありますので、py2exeを使用したいと思います。私はPython 2.6.6をインストールしたXPシステムを持っています。私はpy2exe-0.6.9ソースをダウンロードしましたが、( "python setup.py install"で)インストールしようとすると "Unable to find vcvarsall.bat"というエラーが出ました。私はグーグルでthis postに行きました。回答者はMinGW GCCバイナリのカスタマイズ版をインストールすることを提案しましたhere。私はそうし、今py2exeをインストールしようとすると新しいエラーが出ます。py2exeをエラーなくビルドする方法はありますか?
C:\Documents and Settings\Administrator\Desktop\py2exe-0.6.9>python setup.py install
C:\Documents and Settings\Administrator\Desktop\py2exe-0.6.9\py2exe\build_exe.py:16: DeprecationWarning: the sets module is deprecated
import sets
running install
running build
running build_py
running build_ext
building '_memimporter' extension
creating build\temp.win32-2.6
creating build\temp.win32-2.6\Release
creating build\temp.win32-2.6\Release\source
c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -DPYTHONDLL=\"PYTHON26.DLL\" -DPYTHONCOM=\"pythoncom26.dll\" -IC:\Python26\include -IC:\Python26\PC -c source/MemoryModule.c -o build\temp.win32-2.6\Release\source\memorymodule.o
source/MemoryModule.c:30: warning: ignoring #pragma warning
source/MemoryModule.c: In function 'BuildImportTable':
source/MemoryModule.c:364: warning: pointer targets in passing argument 1 of 'MyLoadLibrary' differ in signedness
source/MemoryModule.c: In function 'GetNameTable':
source/MemoryModule.c:610: warning: passing argument 4 of 'qsort' from incompatible pointer type
source/MemoryModule.c: In function 'MemoryGetProcAddress':
source/MemoryModule.c:637: warning: passing argument 5 of 'bsearch' from incompatible pointer type
c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -DPYTHONDLL=\"PYTHON26.DLL\" -DPYTHONCOM=\"pythoncom26.dll\" -IC:\Python26\include -IC:\Python26\PC -c source/_memimporter_module.c -o build\temp.win32-2.6\Release\source\_memimporter_module.o
In file included from source/_memimporter.c:8,
from source/_memimporter_module.c:2:
source/Python-version.h:13: error: redefinition of typedef 'Py_ssize_t'
C:\Python26\include/pyport.h:115: error: previous declaration of 'Py_ssize_t' was here
error: command 'gcc' failed with exit status 1
本当にコンパイルする必要がありますか?勝利のバイナリがありますか? – JustFogMaxi
* smacks head *私は明らかにsourceforgeサイトで十分に見苦しくはありませんでした。私は単に「最新のバージョンを探していますか?py2exe-0.6.9.zip(149.7 KB)をダウンロード」リンクをクリックして、他のダウンロードを調べるとバイナリが存在することに気が付きませんでした。ありがとう!この問題は、建物の問題を解決することが誰にとっても重要な場合に備えて、私は生きていきます。 –
あなたのコードはPythonのみですか?もしそうなら、あなたはc-compillerなしでexeファイルにコンパイルできるはずです。これには、すべてのDLL(OSのものを除く)だけが含まれます。 vcvarsall.batについて:これはVisual Studioの設定ファイルです。エクスプレス(無料)版をダウンロードしても問題ありません。このバットファイルはpathesのようなすべての環境変数をバイナリに設定し、開発に必要なディレクトリを設定します。良い解決を望みます – Pavlonator