[root@atyu30 demo]# rpm -qa | grep wxPython
wxPython2.8-gtk2-unicode-2.8.11.0-1_py2.4
wxPython-common-gtk2-unicode-2.8.11.0-1_py2.4
wxPython2.8-devel-gtk2-unicode-2.8.11.0-1_py2.4
[root@atyu30 demo]# uname -a
Linux atyu30 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:39 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
[root@atyu30 demo]# python demo.py
Traceback (most recent call last):
File "demo.py", line 3, in ?
import Main
File "/usr/src/redhat/SOURCES/wxPython-src-2.8.11.0/wxPython/demo/Main.py", line 56, in ?
import wx
ImportError: No module named wx
wxPython Bug
处理办法:
[root@atyu30 site-packages]# pwd
/usr/lib64/python2.4/site-packages
添加 wx.pth
[root@atyu30 site-packages]# cat wx.pth
wx-2.8-gtk2-unicode
[root@atyu30 site-packages]# python
Python 2.4.3 (#1, Jun 11 2009, 14:09:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>>
阅读(1990) | 评论(0) | 转发(0) |