RHEL5.5 X64 wxPython 错误

2022阅读 0评论2011-02-06 atyu30
分类:Python/Ruby

[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
>>>

上一篇:RHE5.4 X64 VMware-server-1.0运行RHEL6问题
下一篇:Oracle Linux 6正式版发布