Installing wxpython on ubuntu 14.04
Solution 1
Before that install gtk3
$ sudo apt-get install libgtk-3-dev
If you are facing problem to install wxpython on Python3 please use this command to install wxpython
$ pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 wxPython
By this command you can install latest wxPython4 version. If you are using Windows or macOS
$ pip install -U wxpython
If you are using Anaconda/Conda
$ conda install -C anaconda wxpython
Solution 2
All you need is:
sudo apt-get install python-wxgtk3.0
Solution 3
The answer about installing "python-wxgtk2.8" is correct. But that's if you want to install 2.8, if you want 3.0 in 14.04, you can get it by following this post. I have done that, and have wx 3.0 installed.
wugology
Hadoop, Hive, SQL, Pig, R, python, javascript, data science, linguistics
Updated on November 23, 2020Comments
-
wugology over 3 years
When I try to open PlayOnLinux from the commandline, I get this error:
Looking for python... 2.7.8 - selected Traceback (most recent call last): File "mainwindow.py", line 31, in <module> import wxversion ImportError: No module named wxversion
Nearly every forum post I have found has suggested I install wxPython, then links here or to some other wxpython wiki page. Unfortunately, the entire wxpython wiki website currently says "wxPyWiki is down for troubleshooting" right now.
I found this StackOverflow question, which is basically the same as mine. I tried all the lower-voted comments, and they all appear to work, but
import wx
still fails. When I tried the top-rated comment in that thread, I got to step 7 successfully, but then it saysIn file included from scr/helpers.cpp:16:0: include/wx/wxPython/wxPython_int.h:19:19: fatal error: wx/wx.h: No such file or directory #include <wx/wx.h> compilation terminated
If anyone has any suggestions for how I can properly install wxPython on Ubuntu, they would be greatly appreciated.
EDIT:
sudo pip install wxPython
tells me it's already installed ("Requirement already satisfied") and suggests I use--upgrade
. It's not installed,import wx
still fails.EDIT:
sudo apt-get install wxpython
gives the errorUnable to locate package wxpython
EDIT: I tried
sudo apt-get install python-wxglade
and it appeared to work, but playonlinux still gives the same error andimport wx
still fails.EDIT: I tried uninstalling and reinstalling playonlinux and python-wxversion. Both remove/install appeared successful, but I still get the same
No module named wxversion
error.EDIT: I tried the solutions posted here (except for reinstalling the OS). They did not work. I'd rather not reinstall Ubuntu.
-
wugology over 9 yearsI used
sudo apt-get install python-wxglade
and it appeared to work, but playonlinux still gives the same error andimport wx
still fails. -
Adam Hughes over 9 yearsThis answer will work unless you are trying to isntall to virtual environment/secondary python directory.
-
Toluene almost 8 yearsThe link is broken.
-
Toluene almost 8 yearsThis package no longer exists and was replaced by version 3.0.
-
nukeguy about 7 yearsDidn't work for me. Python-wxgtk3.0 successfully installed but PlayOnLinux still cannot import wxversion
-
Tung over 6 yearsThis method doesn't work anymore for either Trusty 14.04 or Mint 17. Try this instead (ref)
sudo add-apt-repository ppa:adamwolf/kicad-trusty-backports
|sudo apt-get update
|sudo apt-get install libwxgtk3.0-dev python-wxgtk3.0-dev
-
Reijo Korhonen about 4 yearsI needed wxPython for python3, because nowdays python2.7 seems to be deprecared with modern python libraries like tensorflow. I got wxPython to Ubuntu 14.04 with hint of this answer sudo apt-get install libgtk-3-dev && sudo pip3 install wxPython It took some time to compile, but succeeded.