I've built wxPython 2.8.11 from source on RHEL5 and after a lot of
fiddling and googling and rebuilding it works - some of the time. But
some of the time importing wx raises the following exception :
File "/usr/local/tt-env/gtk2.18/lib64/python2.6/site-packages/wxusecase.py", line 4, in <module>
import guiusecase, os, time, wx, logging
File "/usr/local/tt-env/gtk2.18/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/wx/__init__.py", line 45, in <module>
from wx._core import *
File "/usr/local/tt-env/gtk2.18/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 4, in <module>
import _core_
ImportError: libwx_gtk2u_richtext-2.8.so.0: cannot open shared object file: No such file or directory
This is an odd message because libwx_gtk2u_richtext-2.8.so.0 does
indeed exist and is on my LD_LIBRARY_PATH, and rerunning the same code
in the same way works most of the time.
I haven't been able to determine a pattern between when it works and
when it doesn't - except that possibly it is less reliable when the
system is more loaded.
Does anyone have any tips for what could be the cause or how I can go
about debugging it?
Are you sure that the run time environment is the same between the times that it is successful and when it is not? Also, any chance that there are more than one set of wxGTK and/or wxPython binaries installed?
···
On 8/23/10 12:54 PM, Geoff Bache wrote:
Hi all,
I've built wxPython 2.8.11 from source on RHEL5 and after a lot of
fiddling and googling and rebuilding it works - some of the time. But
some of the time importing wx raises the following exception :
File "/usr/local/tt-env/gtk2.18/lib64/python2.6/site-packages/wxusecase.py", line 4, in<module>
import guiusecase, os, time, wx, logging
File "/usr/local/tt-env/gtk2.18/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/wx/__init__.py", line 45, in<module>
from wx._core import *
File "/usr/local/tt-env/gtk2.18/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 4, in<module>
import _core_
ImportError: libwx_gtk2u_richtext-2.8.so.0: cannot open shared object file: No such file or directory
This is an odd message because libwx_gtk2u_richtext-2.8.so.0 does
indeed exist and is on my LD_LIBRARY_PATH, and rerunning the same code
in the same way works most of the time.
I haven't been able to determine a pattern between when it works and
when it doesn't - except that possibly it is less reliable when the
system is more loaded.
Does anyone have any tips for what could be the cause or how I can go
about debugging it?
Are you sure that the run time environment is the same between the times
that it is successful and when it is not?
I'm running the same script in the same way on the same machine. Of
course
it's always possible that something else in the system is interfering
somehow...
If I deliberately sabotage LD_LIBRARY_PATH I get the same stack trace
so I
guess something might be screwing it up somehow.
Also, any chance that there
are more than one set of wxGTK and/or wxPython binaries installed?
Not by design. There is more than one Python installation but the
other
one doesn't have wx at all. "rpm -qa | grep wx" returns nothing.
My apologies - this wasn't a wxPython issue in the end.
/Geoff
···
On Aug 24, 8:37 am, Geoff Bache <geoff.ba...@gmail.com> wrote:
> Are you sure that the run time environment is the same between the times
> that it is successful and when it is not?
I'm running the same script in the same way on the same machine. Of
course
it's always possible that something else in the system is interfering
somehow...
If I deliberately sabotage LD_LIBRARY_PATH I get the same stack trace
so I
guess something might be screwing it up somehow.
> Also, any chance that there
> are more than one set of wxGTK and/or wxPython binaries installed?
Not by design. There is more than one Python installation but the
other
one doesn't have wx at all. "rpm -qa | grep wx" returns nothing.