I am using pyinstaller on a python script that imports matplotlib.pyplot. The exe created by pyinstaller runs just fine when a directory full of files is generated. However, the exe fails when the pyinstaller -F option is used to create a single exe file. There are two problems reported when it fails:
WARNING: file already exists but should not: C:\Users\Vern\AppData\Local\Temp_MEI33442\Include\pyconfig.h
The last two lines of traceback report this:
File "C:\Users\Vern\Documents\Python\testplot\build\testplot\out00-PYZ.pyz\matplotlib.pyplot", line 80, in _backend_selection
File "C:\PyInstaller\PyInstaller\loader\pyi_importers.py", line 409, in load_module module = imp.load_module(fullname, fp, filename, self._c_ext_tuple)
ImportError: could not import module 'PySide.QtCore'
This last one, the ImportError is where the exe stops.
I am using python 2.7.6 and pyinstaller 2.1 on a Windows 7 machine.
There are some warning messages generated when pyinstaller runs. They look like these:
WARNING: lib not found: QtGui4.dll dependency of C:/WinPython/python-2.7.6/Lib/sitepackages/PyQt4/plugins\iconengines\qsvgicon4.dll
WARNING: lib not found: QtSvg4.dll dependency of C:/WinPython/python-2.7.6/Lib/sitepackages/PyQt4/plugins\iconengines\qsvgicon4.dll
WARNING: lib not found: QtCore4.dll dependency of C:/WinPython/python-2.7.6/Lib/sitepackages/PyQt4/plugins\iconengines\qsvgicon4.dll
...more like those followed but have been omitted.
These warnings are generated by pyinstaller when the -F option is either used or not used so I do not know if they are relevant but they seem very suspicious. I am out of my area of expertise on much of this so please excuse my ignorance. At any rate, the exe runs just fine even with these warnings when not using the -F option. It only fails when using the -F option.
I have searched around on SO and goggle but without any luck. I would like to be able to use the -F option to generate a single exe file for distribution. I am not using any other options for pyinstaller and I have not done anything to the spec file that gets automatically generated. My other python scripts that do not import matplotlib work fine when converted to a single exe file using -F.