wxpython - 在 Ubuntu 12.04 上安装 wxPython

标签 wxpython installation debian ubuntu-12.04

问题:我在 Ubuntu 12.04 上安装 wxPython 时遇到问题。我想找到一种简单直接的方法来做到这一点。

到目前为止我做了什么:到目前为止我能找到的最相关的说明可以在这里找到: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 Precise 上正确安装 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

瞧!有用!

关于wxpython - 在 Ubuntu 12.04 上安装 wxPython,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14007557/

相关文章:

python - 在 GUI 中呈现数据的最无缝方式

android - 具有 2 个启动器 Activity 的应用程序

installation - 如何更改 apt-get 安装目录

linux - 在 Linux 中列出组可写的文件和目录

Python 类成员与实例成员不同

python - 如何向 wx.ScrolledPanel 添加项目?

python - 使用 StatusBar 将鼠标悬停在按钮上

database - 在 ubuntu 上安装 oracle 10g xe。登录和创建数据库的问题

linux - 如何检查我是否达到了 Linux 中的 X 限制?

linux - Raspberry Pi - 缺少 linux-headers 目录