Why isn't pyinstaller making me an .exe file?
Posted
by Matt Miller
on Stack Overflow
See other posts from Stack Overflow
or by Matt Miller
Published on 2010-05-14T02:59:51Z
Indexed on
2010/05/14
3:04 UTC
Read the original article
Hit count: 496
python
|pyinstaller
I am attempting to follow this guide to make a simple Hello World script into an .exe file.
I have Windows Vista with an AMD 64-bit processor
I have installed Python 2.6.5 (Windows AMD64 version)
I have set the PATH (if that's the right word) so that the command line recognizes Python
I have installed UPX (there only seems to be a 32-bit version for Windows) and pasted a copy of upx.exe into the Python26 folder as instructed.
I have installed Pywin (Windows AMD 64 Python 2.6 version)
I have run Pyinstaller's Configure.py. It gives some error messages but seems to complete. I don't know if this is what's causing the problem, so the following is what it says when I run it:
C:\Python26\Pyinstaller\branches\py26win>Configure.py
I: read old config from C:\Python26\Pyinstaller\branches\py26win\config.dat
I: computing EXE_dependencies
I: Finding TCL/TK...
I: Analyzing C:\Python26\DLLs_tkinter.pyd
W: Cannot get binary dependencies for file:
W: C:\Python26\DLLs_tkinter.pyd
W: Traceback (most recent call last):
File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 608, in get Imports
return _getImports_pe(pth) File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 275, in _ge tImports_pe
importva, importsz = datadirs[1] IndexError: list index out of rangeI: Analyzing C:\Python26\DLLs_ctypes.pyd
W: Cannot get binary dependencies for file:
W: C:\Python26\DLLs_ctypes.pyd
W: Traceback (most recent call last):
File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 608, in get Imports
return _getImports_pe(pth)
File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 275, in _ge tImports_pe
importva, importsz = datadirs[1]
IndexError: list index out of rangeI: Analyzing C:\Python26\DLLs\select.pyd
W: Cannot get binary dependencies for file:
W: C:\Python26\DLLs\select.pyd
W: Traceback (most recent call last):
File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 608, in get Imports
return _getImports_pe(pth)
File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 275, in _ge tImports_pe
importva, importsz = datadirs[1]
IndexError: list index out of rangeI: Analyzing C:\Python26\DLLs\unicodedata.pyd
W: Cannot get binary dependencies for file:
W: C:\Python26\DLLs\unicodedata.pyd
W: Traceback (most recent call last):
File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 608, in get Imports
return _getImports_pe(pth)
File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 275, in _ge tImports_pe
importva, importsz = datadirs[1]
IndexError: list index out of rangeI: Analyzing C:\Python26\DLLs\bz2.pyd
W: Cannot get binary dependencies for file:
W: C:\Python26\DLLs\bz2.pyd
W: Traceback (most recent call last):
File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 608, in get Imports
return _getImports_pe(pth)
File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 275, in _ge tImports_pe
importva, importsz = datadirs[1]
IndexError: list index out of rangeI: Analyzing C:\Python26\python.exe
I: Dependent assemblies of C:\Python26\python.exe:
I: amd64_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none
I: Searching for assembly amd64_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_ none...
I: Found manifest C:\Windows\WinSxS\Manifests\amd64_microsoft.vc90.crt_1fc8b3b9a 1e18e3b_9.0.21022.8_none_750b37ff97f4f68b.manifest
I: Searching for file msvcr90.dll
I: Found file C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21 022.8_none_750b37ff97f4f68b\msvcr90.dll
I: Searching for file msvcp90.dll
I: Found file C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21 022.8_none_750b37ff97f4f68b\msvcp90.dll
I: Searching for file msvcm90.dll
I: Found file C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21 022.8_none_750b37ff97f4f68b\msvcm90.dll
I: Adding Microsoft.VC90.CRT\Microsoft.VC90.CRT.manifest
I: Adding Microsoft.VC90.CRT\msvcr90.dll
I: Adding Microsoft.VC90.CRT\msvcp90.dll
I: Adding Microsoft.VC90.CRT\msvcm90.dll
W: Cannot get binary dependencies for file:
W: C:\Python26\python.exe
W: Traceback (most recent call last):
File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 608, in get Imports
return _getImports_pe(pth)
File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 275, in _ge tImports_pe
importva, importsz = datadirs[1]
IndexError: list index out of rangeI: Analyzing C:\Windows\WinSxS\Manifests\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e 3b_9.0.21022.8_none_750b37ff97f4f68b.manifest
I: Analyzing C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.210 22.8_none_750b37ff97f4f68b\msvcr90.dll
W: Cannot get binary dependencies for file:
W: C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_ 750b37ff97f4f68b\msvcr90.dll
W: Traceback (most recent call last):
File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 608, in get Imports
return _getImports_pe(pth)
File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 275, in _ge tImports_pe
importva, importsz = datadirs[1]
IndexError: list index out of rangeI: Analyzing C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.210 22.8_none_750b37ff97f4f68b\msvcp90.dll
W: Cannot get binary dependencies for file:
W: C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_ 750b37ff97f4f68b\msvcp90.dll
W: Traceback (most recent call last):
File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 608, in get Imports
return _getImports_pe(pth)
File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 275, in _ge tImports_pe
importva, importsz = datadirs[1]
IndexError: list index out of rangeI: Analyzing C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.210 22.8_none_750b37ff97f4f68b\msvcm90.dll
W: Cannot get binary dependencies for file:
W: C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_ 750b37ff97f4f68b\msvcm90.dll
W: Traceback (most recent call last):
File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 608, in get Imports
return _getImports_pe(pth)
File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 275, in _ge tImports_pe
importva, importsz = datadirs[1]
IndexError: list index out of rangeI: 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...
I: done generating C:\Python26\Pyinstaller\branches\py26win\config.dat
My Python script (named Hello.py) is the same as the example:
#!/usr/bin/env python
for i in xrange(10000):
print "Hello, World!"
This is my BAT file, in the same directory:
set PIP=C:\Python26\Pyinstaller\branches\py26win\
python %PIP%Makespec.py --onefile --console --upx --tk Hello.py
python %PIP%Build.py Hello.spec
When I run Hello.bat in the command prompt several files are made, none of which are an .exe file, and the following is displayed:
C:\My Files>set PIP=C:\Python26\Pyinstaller\branches\py26win\
C:\My Files>python C:\Python26\Pyinstaller\branches\py26win\Makespec.py --onefil e --console --upx --tk Hello.py wrote C:\My Files\Hello.spec now run Build.py to build the executable
C:\My Files>python C:\Python26\Pyinstaller\branches\py26win\Build.py Hello.spec
I: Dependent assemblies of C:\Python26\python.exe: I: amd64_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none Traceback (most recent call last): File "C:\Python26\Pyinstaller\branches\py26win\Build.py", line 1359, in main(args[0], configfilename=opts.configfile)
File "C:\Python26\Pyinstaller\branches\py26win\Build.py", line 1337, in main build(specfile)
File "C:\Python26\Pyinstaller\branches\py26win\Build.py", line 1297, in build execfile(spec)
File "Hello.spec", line 3, in
pathex=['C:\My Files'])
File "C:\Python26\Pyinstaller\branches\py26win\Build.py", line 292, in _init _
raise ValueError, "script '%s' not found" % script
ValueError: script 'C:\Python26\Pyinstaller\branches\py26win\support\useTK.py' n ot found
I have limited knowledge with the command prompt, so please take baby steps with me if I need to do something there.
© Stack Overflow or respective owner