2011-05-13 7 views
5

저는 일반적으로 Windows 사용자가 아니지만 py2exe를 사용하여 python 코드에서 exe를 빌드해야합니다. 나는 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 
+4

정말로 컴파일해야합니까? 승리 바이너리가 있습니까? – JustFogMaxi

+2

* smacks head * 나는 sourceforge 사이트에서 분명히 열심히 보지 않았다. 필자는 단순히 "최신 버전을 찾고 py2exe-0.6.9.zip (149.7 KB)을 다운로드"링크를 클릭하여 다른 다운로드를 탐색 할 경우 바이너리가 있음을 알지 못했습니다. 감사! 건물 문제를 해결하는 것이 누구에게나 중요하기 때문에이 질문을 계속 할 것입니다. –

+1

코드 파이썬 전용입니까? 그렇다면 당신은 c-compiller없이 exe로 컴파일 할 수 있어야합니다. 그것은 단지 모든 DLL을 포함합니다 (OS의 것 제외). vcvarsall.bat 정보 : Visual Studio의 구성 bat 파일입니다. 익스프레스 (무료) 버전을 다운로드하면 괜찮을 것입니다. 이 박쥐 파일은 pathes와 같은 모든 환경 변수를 개발과 함께 필요한 바이너리로 설정합니다. 좋은 해결책을 원합니다. – Pavlonator

답변

0

http://bugs.python.org/issue1485576 당신이 다시 열려면이를 지원하기 위해 테스트 케이스를 제공 할 수 있습니다 버그 있습니다 여기에 출력됩니다.

관련 문제