I ported a PyQt4 application I wrote to PySide but I cannot create an executable file for it. I have attempted to use py2exe, cx_freeze, and PyInstaller to create the exe for PySide, the first two provide similar errors (none provide error reports during build, everything appears good until I try to run the exe) - The PyQt4 version is freezable via py2exe.
System Info
Windows 7, 64 bit - all software are 32-bit versions below packages being used:
- Python 2.7.3 via Python(x,y) 2.7.3.1
- Qt 4.8.2
- PySide 1.1.2
- NumPy 1.6.2
- Pywin32 218-1
Exe Conversion Programs
- PyInstaller 2.0
- cx_Freeze 4.3.1-1
- py2exe 0.6.9
py2exe err.Log
Traceback (most recent call last):
File "myApp.pyw", line 11, in <module>
File "PySide\QtGui.pyc", line 12, in <module>
File "PySide\QtGui.pyc", line 10, in __load
ImportError: DLL load failed: The specified procedure could not be found.
cx_freeze err.Log
Traceback (most recent call last):
File "C:\Python27\Lib\site-packages\cx_Freeze\initscript\Console.py",
line 27, in <module>
exex code in m.__dict__
File "myApp.pyw", line 11, in <module>
File "ExtensionLoader_PySide_QtGui.py", line 11, in <module>
ImportError: DLL load failed: The specified procedure could not be found.
FYI: Line11 of MyApp.pyw = from PySide import QtGui, QtCore
PyInstaller err.Log
"The application has failed to start because its side-by-side configuration is
incorrect. Please see the application event log or use the command-line sxstrace.exe
tool for more detail."
The closest I can find is here but I'm not using that library so I do not think its applicable, nor do I know how to solve that.
Snippet of SxsTrace on the PyInstaller Error
INFO: Reference: Microsoft.VC90.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32 ",version="9.0.21022.8"
What I have tried
Placed "C:\Python27\Lib\site-packages\PySide" at start of Environment Variables Path
Placed copies of: msvcr90.dll, msvcp90.dll, msvcm90.dll into Python/dll location : I believed msvcp90.dll alone allowed py2exe make a operational PyQt4 exe
Remade all qrc resource file using pyside-rcc
Placed all pyside/dlls into dist folder (py2exe)
ran sxstrace and generated log file on PyInstaller error - not sure what I'm looking for I don't see anything that event viewer or the msgbox didn't already tell me (just more of it)
Reinstalled all python/modules, pyqt, pyside, VSE2008 C++ edition, microsoft SDK, microsoft .netframe work 2.0?, Microsoft Visual C++ 2008 Redistributable Package,
Ported all work in progress modules not needed for package but were in dir
Removed any WIP modules that were not successfully ported/were not hooked up
Copied (manually not setup.py) qt.conf (doesn't seem to exist for pyside only pyqt4?) and plugins to dist folder
appchooser
example using PyInstaller with an almost identical PySide/Qt/Python set up without issue. – Austin Phillips<!--<dependentAssembly> <assemblyIdentity name="Microsoft.VC90.MFC" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b" type="win32" version="9.0.21022.8"/> </dependentAssembly>-->
– frmdstryr