Python 'import wx' problem
I am a newbie to python (just started yesterday) and for some reason I cannot import wx to start creating GUIs.
I am using Fedora 5 and installed wxPython via yum, so I thought it should have gone to the correct location. When I try to import wx I get Quote:
'/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode' and I also tried adding /usr/lib/python2.4/wx /usr/lib/python2.4/wxPython to the path but that didn't help. What is wxc and why does it not find it? If I try to import wxc it says it doesn't exist. |
What happens if you just type import wx form the prompt instead of importing it in a sript? I have wx installed and don't see any reference to wxc.
|
[code]
>>> import wx Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.4/site-packages/wx/__init__.py", line 45, in ? from wxPython import wx File "/usr/lib/python2.4/site-packages/wxPython/__init__.py", line 20, in ? import wxc ImportError: /usr/lib/libwx_gtk2-2.4.so.0: undefined symbol: pango_x_get_context>>> [code] It does the same thing. I have looked in several files and tried to take the c of the wx and it didn't help, it just caused other problems. I don't know what wxc is, if I try to import it the interpreter doesn't know what it is either. |
What rpm's did you use to install python and wx?
The only wx reference I have under site packages is /usr/lib/python2.4/site-packages/wx-2.6-gtk2-ansi |
Python was installed when I installed the system and I installed wxPython from Fedoras package manager yum by doing "yum install wxPython"
I had assumed this would make everything go where it is supposed to. I thought about uninstalling Python and reinstalling it but there are so many dependencies that a lot of my other programs will get deleted with it, and I already removed wxPython and reinstalled it. |
In this particular case I didn't use wxPython from the Fedora repos. You might try installing the rpms from:
http://wxpython.org/download.php These are the two I used (you can use unicode instead of ansi): wxPython2.6-gtk2-ansi-2.6.3.0-fc4_py2.4 wxPython-common-gtk2-ansi-2.6.3.0-fc4_py2.4 I know that doesn't actually explain what is up with the wxPython you installed, but at least it should get you working. |
okay, I will try it
|
All times are GMT -5. The time now is 09:17 PM. |