/opt/Python-2.4.3/bin/python ./Notebook.py
Traceback (most recent call last):
File "./Notebook.py", line 4, in ?
import wx
File "/opt/Python-2.4.3/lib/python2.4/site-packages/wx-2.6-gtk2-ansi/wx/__init__.py", line 42, in ?
from wx._core import *
File "/opt/Python-2.4.3/lib/python2.4/site-packages/wx-2.6-gtk2-ansi/wx/_core.py", line 4, in ?
import _core_
ImportError: libwx_gtk2d_xrc-2.6.so.0: cannot open shared object file: No such file or directory
/opt/Python-2.4.3/bin/python ./Notebook.py
Traceback (most recent call last):
File "./Notebook.py", line 4, in ?
import wx
File "/opt/Python-2.4.3/lib/python2.4/site-packages/wx-2.6-gtk2-ansi/wx/__init__.py", line 42, in ?
from wx._core import *
File "/opt/Python-2.4.3/lib/python2.4/site-packages/wx-2.6-gtk2-ansi/wx/_core.py", line 4, in ?
import _core_
ImportError: libwx_gtk2d_xrc-2.6.so.0: cannot open shared object file: No such file or directory
Any idea what's going on here?
By default the path to the wx shared libs is not embedded in the wxPython extension modules, so the dynamic loader will just look in the standard paths and in any paths specified by the LD_LIBRARY_PATH environment variable. You can either set that variable to include /opt/Python-2.4.3/wxWidgets-2.6.3-PythonOnly/lib, add the path to /etd/ld.so.conf and rerun ldconfig, or rebuild wxPython giving the --rpath=/opt/Python-2.4.3/wxWidgets-2.6.3-PythonOnly/lib option to the build_ext setup command.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
environment variable. You can either set that variable to include /opt/Python-2.4.3/wxWidgets-2.6.3-PythonOnly/lib, add the path to /etd/ld.so.conf and rerun ldconfig, or rebuild wxPython giving the --rpath=/opt/Python-2.4.3/wxWidgets-2.6.3-PythonOnly/lib option to the build_ext setup command.
Excellent, thanks for the help. Now, the question is this: why is the wxPython NOT looking for Unicode wxWidgets libs? All of my wx libs are Unicode, I think; for example wxPython looks for
libwx_gtk2d_xrc-2.6.so.0
when I really have
libwx_gtk2ud_xrc-2.6.so.0
As I can see from the line I supplied above, I am enabling Unicode by setting UNICODE=1 on the build command line:
environment variable. You can either set that variable to include /opt/Python-2.4.3/wxWidgets-2.6.3-PythonOnly/lib, add the path to /etd/ld.so.conf and rerun ldconfig, or rebuild wxPython giving the --rpath=/opt/Python-2.4.3/wxWidgets-2.6.3-PythonOnly/lib option to the build_ext setup command.
Excellent, thanks for the help. Now, the question is this: why is the wxPython NOT looking for Unicode wxWidgets libs? All of my wx libs are Unicode, I think; for example wxPython looks for
libwx_gtk2d_xrc-2.6.so.0
when I really have
libwx_gtk2ud_xrc-2.6.so.0
As I can see from the line I supplied above, I am enabling Unicode by setting UNICODE=1 on the build command line:
Near the begining of setup.py's output there is a line that starts with "Using flags:" What is the rest of the line? What do you get if you run "wx-config --list " + those flags?
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Near the begining of setup.py's output there is a line that starts with "Using flags:" What is the rest of the line? What do you get if you run "wx-config --list " + those flags?
Actually, I was able to fix this by setting UNICODE=1 in the config.py file... now things work as they should!
ImportError: libwx_gtk2d_xrc-2.6.so.0: cannot open shared object file: No such file or directory
Ok, I got past that error. Now, whenever I try to run an app using wxWidgets, I get this traceback:
Traceback (most recent call last):
File "./SPE.py", line 48, in ?
import ConfigParser, sys, os, wx
File "/opt/Python-2.4.4-OR-EL5/lib/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/__init__.py", line 45, in ?
from wx._core import *
File "/opt/Python-2.4.4-OR-EL5/lib/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 4, in ?
import _core_
ImportError: /opt/Python-2.4.4-OR-EL5/lib/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/_core_.so: undefined symbol: PyUnicodeUCS2_FromEncodedObject
I've searched the entire source tree for the symbol, and the only place it's present is _core_.so . How do I resolve or get rid of the reference to this symbol?
ImportError: libwx_gtk2d_xrc-2.6.so.0: cannot open shared object file: No such file or directory
Ok, I got past that error. Now, whenever I try to run an app using wxWidgets, I get this traceback:
Traceback (most recent call last):
File "./SPE.py", line 48, in ?
import ConfigParser, sys, os, wx
File "/opt/Python-2.4.4-OR-EL5/lib/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/__init__.py", line 45, in ?
from wx._core import *
File "/opt/Python-2.4.4-OR-EL5/lib/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 4, in ?
import _core_
ImportError: /opt/Python-2.4.4-OR-EL5/lib/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/_core_.so: undefined symbol: PyUnicodeUCS2_FromEncodedObject
I've searched the entire source tree for the symbol, and the only place it's present is _core_.so . How do I resolve or get rid of the reference to this symbol?
Any time there is a missing UCS2 or UCS4 symbol it usually means that you are running with a different Python than what wxPython (or other extension module) was built with, and that the two Pythons had different configure options when they were built. One had --enable-unicode=ucs4 and one had --enable-unicode=ucs2.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!