I’m getting an import error from the py2exe example, test_wx_console.exe when running the exe from a makefile from within Eclipse.
This only occurs on one user’s PC (I can’t reproduce it), and it works when calling the makefile from the command prompt. I’m pulling my hair out because I can’t even work out how to debug the problem. I can’t think what could be different between running the exe from different environments. Windows is meant to search the exe dir first, and I’ve even tried including all non-system32 dlls in this dir (gdiplus.dll, MSVCP71.dll, etc.) I can’t tell which DLL it can’t find because the event log doesn’t record any error.
Does anyone have any ideas?
Traceback (most recent call last):
File “test_wx.py”, line 1, in
File “wxPython_init_.pyo”, line 15, in
File “wxPython_wx.pyo”, line 3, in
File “wxPython_core.pyo”, line 15, in
File “wx_init_.pyo”, line 45, in
File “wx_core.pyo”, line 4, in
File “wx_core_.pyo”, line 12, in
File “wx_core_.pyo”, line 10, in __load
ImportError: DLL load failed: The referenced assembly is not installed on your system.
I'm getting an import error from the py2exe example, test_wx_console.exe
when running the exe from a makefile from within Eclipse.
Did you create the exe using py2exe's "console" mode? If so, that
could be the issue. wxPython programs should be built with the
"windows" mode enabled.
This only occurs on one user's PC (I can't reproduce it), and it works when
calling the makefile from the command prompt. I'm pulling my hair out
because I can't even work out how to debug the problem. I can't think what
could be different between running the exe from different environments.
Windows is meant to search the exe dir first, and I've even tried including
all non-system32 dlls in this dir (gdiplus.dll, MSVCP71.dll, etc.) I can't
tell which DLL it can't find because the event log doesn't record any error.
Does anyone have any ideas?
Traceback (most recent call last):
File "test_wx.py", line 1, in <module>
File "wxPython\__init__.pyo", line 15, in <module>
File "wxPython\_wx.pyo", line 3, in <module>
File "wxPython\_core.pyo", line 15, in <module>
File "wx\__init__.pyo", line 45, in <module>
File "wx\_core.pyo", line 4, in <module>
File "wx\_core_.pyo", line 12, in <module>
File "wx\_core_.pyo", line 10, in __load
ImportError: DLL load failed: The referenced assembly is not installed on
your system.
I'm using Python 2.5.4 and wxpython 2.8.10.1.
Thanks,
Ed
You can try downloading Dependency Walker and running that against
your exe. It can tell you what's missing (usually):
I’m getting an import error from the py2exe example, test_wx_console.exe when running the exe from a makefile from within Eclipse.
This only occurs on one user’s PC (I can’t reproduce it), and it works when calling the makefile from the command prompt. I’m pulling my hair out because I can’t even work out how to debug the problem. I can’t think what could be different between running the exe from different environments. Windows is meant to search the exe dir first, and I’ve even tried including all non-system32 dlls in this dir (gdiplus.dll, MSVCP71.dll, etc.) I can’t tell which DLL it can’t find because the event log doesn’t record any error.
Does anyone have any ideas?
Traceback (most recent call last):
File “test_wx.py”, line 1, in
File “wxPython_init_.pyo”, line 15, in
File “wxPython_wx.pyo”, line 3, in
File “wxPython_core.pyo”, line 15, in
File “wx_init_.pyo”, line 45, in
File “wx_core.pyo”, line 4, in
File “wx_core_.pyo”, line 12, in
File “wx_core_.pyo”, line 10, in __load
ImportError: DLL load failed: The referenced assembly is not installed on your system.
I'm getting an import error from the py2exe example, test_wx_console.exe
when running the exe from a makefile from within Eclipse.
This only occurs on one user's PC (I can't reproduce it), and it works
when calling the makefile from the command prompt. I'm pulling my hair
out because I can't even work out how to debug the problem. I can't
think what could be different between running the exe from different
environments.
Is there a difference in the version of Windows between your PC and the user's PC? Running on the same version will likely help you narrow down the problem.
> Windows is meant to search the exe dir first, and I've
even tried including all non-system32 dlls in this dir (gdiplus.dll,
MSVCP71.dll, etc.) I can't tell which DLL it can't find because the
event log doesn't record any error.
As Mike mentions using the dependency walker tool on _core_.pyd will help you find all the DLLs that are needed, and if you're able to run it on the user's PC too that will show you what is missing. (Although it can give you some false readings for DLLs that are only loaded on demand but are never used.)
Since the error mentions "assembly" then that is another clue, although I'm not sure what assemblies the Py2.5 version would be using other than gdiplus, which is sometimes installed as an assembly... Assemblies are microsoft's answer to DLL hell, but in my and many other's opinion they just made things worse. If it's really a missing assembly then it is likely looking for something that should be installed under the Windows system dir, or in a "private assembly" belonging to your application.
That solution looks like it is for Python 2.6.2, but the OP is using
2.5.4 and the dll's used by them are not the same.
Werner
···
On Tue, Nov 3, 2009 at 10:27 AM, Ed Porteous <ed.porteous@gmail.com > <mailto:ed.porteous@gmail.com>> wrote:
Hi,
I'm getting an import error from the py2exe example,
test_wx_console.exe when running the exe from a makefile from
within Eclipse.
This only occurs on one user's PC (I can't reproduce it), and it
works when calling the makefile from the command prompt. I'm
pulling my hair out because I can't even work out how to debug the
problem. I can't think what could be different between running the
exe from different environments. Windows is meant to search the
exe dir first, and I've even tried including all non-system32 dlls
in this dir (gdiplus.dll, MSVCP71.dll, etc.) I can't tell which
DLL it can't find because the event log doesn't record any error.
Does anyone have any ideas?
Traceback (most recent call last):
File "test_wx.py", line 1, in <module>
File "wxPython\__init__.pyo", line 15, in <module>
File "wxPython\_wx.pyo", line 3, in <module>
File "wxPython\_core.pyo", line 15, in <module>
File "wx\__init__.pyo", line 45, in <module>
File "wx\_core.pyo", line 4, in <module>
File "wx\_core_.pyo", line 12, in <module>
File "wx\_core_.pyo", line 10, in __load
ImportError: DLL load failed: The referenced assembly is not
installed on your system.