10

I have a problem with playonlinx, and it requires me to install wxpython, but I have it already installed. I've used different methods, but every-time I do import wx, it gives me this error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named wx

So I don't know what to do now, I've also installed and reinstalled playonlinux, and still it doesn't work.

1

3 Answers 3

14

I could install it by typing in a terminal:

sudo apt-get install python-wxgtk3.0

I don't know but I think that the older versions (2.8, 2.6, …) aren't currently in the 16.04 repositories.

2
  • 1
    You are a life saver! I am trying to get wx installed using pip in a Mint Linux 18.3 and the libgtk-3-dev dependency is making Mint not start. It's nice to realize there's a way to get wx without having to install the build environment for it. Feb 4, 2018 at 6:01
  • İt installs for python 2.7 is there way for PYthon. 3.x PLease???? Dec 3, 2020 at 18:52
4

Meanwhile it's possible to install wxPython with sudo pip install wxpython, eventually you have to use sudo pip install --upgrade wxpython. If you need 4.x which isn't provided by Ubuntu (for some years) this is the sanest option.

1

I installed wxPython as part of the PsychoPy experiment builder dependencies, and had considerable trouble getting it to install properly as well initially. But this was what worked for me at the end. I use Ubuntu 16.04, python 3.5, pip3 19.0.3

pip3 install -U     -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04     wxPython --user

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .