微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在Ubuntu 12.04上安装wxPython

问题:在Ubuntu 12.04上安装wx Python时遇到麻烦.我想找到一个简单直接的方式来做到这一点.

我已经完成了以下工作:到目前为止,我能够找到的最相关的指令可以在这里找到:http://wiki.wxpython.org/InstallingOnUbuntuOrDebian

这些说明的问题是Precise 12.04无法选择.最新的发行版是Natty 11.4.从我可以找到的,正确的方法是手动构建debian包,这在这里解释:http://wiki.wxpython.org/BuildingDebianPackages

尝试这样做,最后输入命令’fakeroot debian / rules binary’后,我得到错误

debian/rules:14: /usr/share/quilt/quilt.make: No such file or directory
pyversions: missing X(S)-Python-Version in control file,fall back to debian/pyversions
pyversions: missing debian/pyversions file,fall back to supported versions
make: *** No rule to make target `/usr/share/quilt/quilt.make’. Stop.

我似乎无法解决这个错误,或找到适用于我的任何其他适用的资源.我会在这里发布更多链接,但由于我是新的,垃圾邮件过滤器阻止我这样做.

结论:有人知道在Ubuntu 12.04上正确安装wxPython的简单解决方案吗?

更新:我只是简单地使用apt-get命令’sudo apt-get install python-wxgtk2.8′,并且我收到这(似乎很好):

Reading package lists… Done
Building dependency tree

Reading state information… Done
python-wxgtk2.8 is already the newest version.
The following packages were automatically installed and are no longer required:
language-pack-zh-hans yaml-cpP Language-pack-kde-en language-pack-kde-zh-hans language-pack-kde-en-base language-pack-zh-hans-base language-pack-kde-zh-hans-base
Use ‘apt-get autoremove’ to remove them.
0 upgraded,0 newly installed,0 to remove and 173 not upgraded.

但是,一旦我尝试运行某些东西,即’python test_gui.py’,我会收到以下错误

Traceback (most recent call last):
File “test_gui.py”,line 1,in
import wx
ImportError: No module named wx

好的.所以我找出了出路只需在终端中运行以下命令:
sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-doc wx2.8-examples wx2.8-headers wx2.8-i18n

和中提琴.有用.!

原文地址:https://www.jb51.cc/ubuntu/349117.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐