Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
434 views
in Technique[技术] by (71.8m points)

installation - Installing wxPython on Ubuntu 12.04

The Issue: I am having trouble installing wxPython on Ubuntu 12.04. I would like to find a simple, straightforward way of doing this.

What I've Done So Far: The most relevant instructions that I have been able to find so far can be found here: http://wiki.wxpython.org/InstallingOnUbuntuOrDebian

The issue with these instructions is that there is no choice available for Precise 12.04. The most up-to-date distro shown is Natty 11.4. From what I can find, the proper way to do this is to manually build debian packages, which is explained here: http://wiki.wxpython.org/BuildingDebianPackages

Upon attempting this and finally typing the command 'fakeroot debian/rules binary', I get the errors:

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.

I cannot seem to fix this error, or find any other applicable resources that work for me. I would post more links here, but since I am new, the spam filter is blocking me from doing so.

Conclusion: Does someone know a simple solution to properly installing wxPython on Ubuntu 12.04 Precise?

Update: I tried just simply using the apt-get command 'sudo apt-get install python-wxgtk2.8', and I received this (which seems good):

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.

But once I attempt to run something, ie 'python test_gui.py', I get the following error:

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Okay. So I have figured out a way out Just run the following command in a Terminal:

sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-doc wx2.8-examples wx2.8-headers wx2.8-i18n

And Voila! It works!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...