PyInstaller does not recognize loaded pywin32

I downloaded Python 2.7.3, PyInstaller (2.7 compatible) and pywin32 (2.7 compatible) and restarted my machine, but when I enter the query:

pyinstaller.py [opts] nameofscript.py

The prompt says:

Error: PyInstaller for Python 2.6+ for Windows requires pywin32. Please install from http://sourceforge.net/projects/pywin32/

Why can't PyInstaller β€œsee” that I already downloaded pywin32?

+7
source share
3 answers

Got! Found this useful tutorial:

http://bojan-komazec.blogspot.ca/2011/08/how-to-create-windows-executable-from.html

The third paragraph describes how to get around the problem. The link he points to is complex. You need to go here to get the pywin32 installer.

http://sourceforge.net/projects/pywin32/files/pywin32/Build%20218/

+1
source

You must first install pywin32 in the Python path, and then check if it succeeded in executing this Python command:

import win32com 

if there is no error, pywin32 is installed.

0
source

If you are using Python 2.7, the compat.py file in C: / Python27 / Lib / site-packages / PyInstaller must be changed to:

 if is_win: try: #from win32ctypes.pywin32 import pywintypes # noqa: F401 #from win32ctypes.pywin32 import win32api import pywintypes import win32api except ImportError: # This environment variable is set by seutp.py # - It not an error for pywin32 to not be installed at that point if not os.environ.get('PYINSTALLER_NO_PYWIN32_FAILURE'): raise SystemExit('PyInstaller cannot check for assembly dependencies.\n' 'Please install PyWin32 or pywin32-ctypes.\n\n' 'pip install pypiwin32\n') 

to work.

0
source

All Articles