I am trying to use pyinstaller 2.0 to build an .exe file from a python script which uses matplotlib and numpy, but I keep failing. I tried this code from Building python pylab/matplotlib exe using pyinstaller as a simple reference, I get the build done for me, but when I run the exe I get the error:
Traceback (most recent call last):
File "<string>", line 12, in <module>
File "C:\Compilations\pyinstaller-2.0\PyInstaller\loader\iu.py", line 386, in
importHook
mod = _self_doimport(nm, ctx, fqname)
File "C:\Compilations\pyinstaller-2.0\PyInstaller\loader\iu.py", line 480, in
doimport
exec co in mod.__dict__
File "C:\Compilations\pyinstaller-2.0\ptest\build\pyi.win32\ptest\out00-PYZ.py
z\PIL.PpmImagePlugin", line 27, in <module>
LookupError: no codec search functions registered: can't find encoding
Is this a bug or do I need to tinker with the .spec
file and link the matplotlib libraries to pyinstaller somehow? If so - can anyone show me a simple example, please?
I tried cx_Freeze
before and also seem to have a problem as soon as I use a code with matplotlib.
Thanks in advance!