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,264
  • 56
  • 94
  • 147

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,264
  • 56
  • 94
  • 147
Biloba
  • 141
  • 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. – K. Brafford Feb 04 '18 at 06:01
  • İt installs for python 2.7 is there way for PYthon. 3.x PLease???? – Meric Ozcan Dec 03 '20 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.

Kalle Richter
  • 6,180
  • 21
  • 70
  • 103
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