pyinstaller [ErrNo 22]
I had the same issues but found these other solutions did not fix the problem. I did however find a fix as follows:
First, my situation may be a little different to the OP as I'm using the Anaconda Python distribution on Windows 7, and used the conda
command line too to install pywin32
, and then used pip to install pyinstaller
.
I found the same IOError was preceded by this earlier error message in the pyinstaller output log:
ImportError: No system module 'pywintypes' (pywintypes27.dll)
The solution that fixed both errors was to copy the DLL files:
pywintypes27.dll pythoncom27.dll
sitting in:
C:\<anaconda-dir>\Lib\site-packages\win32
to
C:\<anaconda-dir>\Lib\site-packages\win32\lib
Where <anaconda-dir>
will either be your root Anaconda directory:
C:\Users\<username>\AppData\Local\Continuum\Anaconda\
by default,
or an environment you have set up e.g.
C:\Users\<username>\AppData\Local\Continuum\Anaconda\envs\<environment-name>
A came across this answer thanks to Tompa here, who found it solved a similar problem in py2exe.