Why doesn't pyinstaller make me an .exe file?

I am trying to follow this tutorial to make a simple Hello World script in an .exe file.

I have Windows Vista with a 64-bit AMD processor
I have installed Python 2.6.5 (Windows version AMD64)
I have set the PATH (if that is the correct word) so that the command line will recognize Python
I have installed UPX (it seems like a 32-bit version for Windows) and pasted a copy of upx.exe into the Python26 folder as instructed.
I installed Pywin (Windows 64 version Python 2.6)
I ran Pyinstaller Configure.py. It gives some error messages, but seems to quit. I don't know if this is caused by what is causing the problem, so the following is what it says when I run it:

C: \ Python26 \ Pyinstaller \ branches \ py26win> Configure.py
I: read the old config from C: \ Python26 \ Pyinstaller \ branches \ py26win \ config.dat
I: calculating EXE_dependencies
I: Finding TCL / TK ...
I: Analyzing C: \ Python26 \ DLLs_tkinter.pyd
W: Unable to get binary dependencies for file:
W: C: \ Python26 \ DLLs_tkinter.pyd
W: Traceback (last call last):
  File "C: \ Python26 \ Pyinstaller \ branches \ py26win \ bindepend .py ", line 608, in get Import
    return _getImports_pe (pth) File" C: \ Python26 \ Pyinstaller \ branches \ py26win \ bindepend.py ", line 275, in _ge tImports_pe
    importva, importz = datadirs [1] IndexError: index index out of range

I: Parse C: \ Python26 \ DLLs_ctypes.pyd
W: Unable to get binary dependencies for file:
W: C: \ Python26 \ DLLs_ctypes.pyd
W: Traceback (last call last):
  File "C: \ Python26 \ Pyinstaller \ branches \ py26win \ bindepend.py ", line 608, in get Import
    return _getImports_pe (pth)
  File" C: \ Python26 \ Pyinstaller \ branches \ py26win \ bindepend.py ", line 275, in _ge tImports_pe
    importva, importz = datadirs [1]
IndexError: index index out of range

I: Parse C: \ Python26 \ DLLs \ select.pyd
W: Unable to get binary dependencies for file:
W: C: \ Python26 \ DLLs \ select.pyd
W: Traceback (last call last):
  File "C: \ Python26 \ Pyinstaller \ branches \ py26win \ bindepend.py ", line 608, in get Import
    return _getImports_pe (pth)
  File" C: \ Python26 \ Pyinstaller \ branches \ py26win \ bindepend.py ", line 275, in _ge tImports_pe
    importva, importz = datadirs [1]
IndexError: index index out of range

I: Parsing C: \ Python26 \ DLLs \ unicodedata.pyd
W: Unable to get binary dependencies for file:
W: C: \ Python26 \ DLLs \ unicodedata.pyd
W: Traceback (last call last):
  File "C: \ Python26 \ Pyinstaller \ branches \ py26win \ bindepend.py "line 608 in get Import
    return _getImports_pe (pth)
  File" C: \ Python26 \ Pyinstaller \ branches \ py26win \ bindepend.py "line 275 in _ge tImports_pe
    importva, importz = datadirs [1]
IndexError: index index out of range

I: Parsing C: \ Python26 \ DLLs \ bz2.pyd
W: Unable to get binary dependencies for file:
W: C: \ Python26 \ DLLs \ bz2.pyd
W: Traceback (last call last):
  File "C: \ Python26 \ Pyinstaller \ branches \ py26win \ bindepend.py ", line 608, in get Import
    return _getImports_pe (pth)
  File" C: \ Python26 \ Pyinstaller \ branches \ py26win \ bindepend.py ", line 275, in _ge tImports_pe
    importva, importz = datadirs [1]
IndexError: index index out of range

I: Parsing C: \ Python26 \ python.exe
I: Dependent Assemblies C: \ Python26 \ python.exe:
I: amd64_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none
I: Searching for Assembly amd64_Microsoft.VC90.CRT_1fc8b3b9a22_1fc8b3b9a22_1fc8b3b9a22 ..
I: Manifest C: \ Windows \ WinSxS \ Manifests \ amd64_microsoft.vc90.crt_1fc8b3b9a 1e18e3b_9.0.21022.8_none_750b37ff97f4f68b.manifest
I: Searching for msvcr90.dll file I: Searching for the file msvcr90.dll
I: Finding the file C: \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ m\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ m mvcr90.dll .0.21 022.8_none_750b37ff97f4f68b \ msvcr90.dll
I: Searching for msvcp90.dll
I: Found file C: \ Windows \ WinSxS \ amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21
022.8_none_4dll.dll
I: I Locate the file the C: \ the Windows \ the WinSxS \ amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21 022.8_none_750b37ff97f4f68b \ msvcm90.dll
I: add Microsoft.VC90.CRT \ Microsoft.VC90.CRT.manifest
I: add Microsoft.VC90.CRT \ msvcr90 .dll
I: Add Microsoft.VC90.CRT \ msvcp90.dll
I: Add Microsoft.VC90.CRT \ msvcm90.dll
W: Unable to get binary dependencies for file:
W: C: \ Python26 \ python.exe
W: Traceback (latest last call):
  File "C: \ Python26 \ Pyinstaller \ branches \ py26win \ bindepend.py", line 608, in get Import
    return _getImports_pe (pth)
  File "C: \ Python26 \ Pyinstaller \ branches \ py26win \ bindepend.py" , line 275, in _ge tImports_pe
    importva, importz = datadirs [1]
IndexError: index index out of range

I: analysis of the C: \ the Windows \ the WinSxS \ Manifests \ amd64_microsoft.vc90.crt_1fc8b3b9a1e18e 3b_9.0.21022.8_none_750b37ff97f4f68b.manifest
I: Analysis of the C: \ the Windows \ the WinSxS \ amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.210 22.8_none_750b37ff97f4f68b \ msvcr90.dll
the W: Impossible get binary dependencies for file:
W: C: \ Windows \ WinSxS \ amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_ 750b37ff97f4f68b \ msvcr90.dll
W: Traceback (last last call):
  File \ "C: \ Python branches26 branches \ bindepend.py ", line 608, in get Import
    return _getImports_pe (pth)
  File" C: \ Python26 \ Pyinstaller \ branches \ py26win \ bindepend.py ", in line 275, in _ge tImports_pe
    importva, importz = datadirs [1]
IndexError: index index out of range

I: parsing C: \ Windows \ WinSxS \ amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.210 22.8_none_750b37ff97f4f68b \ msvcp90.dll
W: Unable to get binary dependencies for file:
W: C: \ Windows \ Win9cxS \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ m: amdc: \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ creationvisdicecp90.dll 750b37ff97f4f68b \ msvcp90.dll
W: Traceback (last call last):
  File "C: \ Python26 \ Pyinstaller \ branches \ py26win \ bindepend.py", line 608, in get Import
    return _getImports_pe (pth)
  File "C: \ Python26 \ Pyinstaller \ branches \ py26win \ bindepend.py ", line 275, in _ge tImports_pe
    importva, importz = datadirs [1]
IndexError: index index out of range

I: parsing C: \ Windows \ WinSxS \ amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.210 22.8_none_750b37ff97f4f68b \ msvcm90.dll
W: Unable to get binary dependencies for file:
W: C: C: \ Windows64_c90.crt_1fc8b3.0 750b37ff97f4f68b \ msvcm90.dll
W: Traceback (last call last):
  File "C: \ Python26 \ Pyinstaller \ branches \ py26win \ bindepend.py", line 608, in get Import
    return _getImports_pe (pth)
  File "C: \ Python26 \ Pyinstaller \ branches \ py26win \ bindepend.py ", line 275, in _ge tImports_pe
    importva, importz = datadirs [1]
IndexError: index index out of range

I: could not find TCL / TK
I: testing for Zlib ...
Me: ... Zlib is available
I: Testing the ability to install icons, version resources ...
I: ... resource update available

I: Testing Unicode support .. .
I: ... Unicode available
I: testing for UPX ...
I: ... UPX available
I: calculating PYZ dependencies ...
I: creating 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:

install 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 on the command line, multiple files are created, none of which are .exe files, and the following is displayed:

C: \ My Files> install 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 create an executable

C: \ My Files> python C: \ Python26 \ Pyinstaller \ branches \ py26win \ Build.py Hello.spec

I: dependent builds C: \ Python26 \ python.exe: I: amd64_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none Traceback (last last call): 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, basically build (file spec)
  File "C: \ Python26 \ Pyinstaller \ branches \ py26win \ Build.py ", line 1297, in assembly 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 line, so please accept me with me if I need to do something there.

+2


a source to share


1 answer


64-bit Python is not supported by pyinstaller on Windows. There is generally no downside when using 32-bit Python in a 64-bit environment, so the easiest way is to install and use. It also has the added benefit that the executable file generated by pyinstaller will run on both 32-bit and 64-bit Windows.



+6


a source







All Articles