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.

David Foerster
  • 36,890
  • 56
  • 97
  • 151

3 Answers3

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.

David Foerster
  • 36,890
  • 56
  • 97
  • 151
Biloba
  • 141
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
Tokaalmighty
  • 111
  • 1