Error "No module named wxversion" when launching playonlinux

15,891

Solution 1

You can refer this How to install wxPython

Using pip install wxPython-Phoenix (Linux):

sudo pip install --upgrade --pre -f https://wxpython.org/Phoenix/snapshot-builds/ wxPython 

OR this SO Post

Solution 2

python-wxversion is available as a separate package.
Use synaptic or apt to install it.

sudo apt show python-wxversion
Package: python-wxversion
Version: 3.0.2.0+dfsg-1build1
Priority: optional
Section: universe/python
Source: wxpython3.0
Origin: Ubuntu
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: wxWidgets Maintainers <[email protected]>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 64.5 kB
Depends: python:any (<< 2.8), python:any (>= 2.7.5-5~)
Homepage: http://wxpython.org/
Task: edubuntu-desktop-gnome, ubuntustudio-photography
Supported: 9m
Download-Size: 12.7 kB
APT-Manual-Installed: no
APT-Sources: http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
Description: API for selecting the wxPython version to use
 wxWidgets (formerly known as wxWindows) is a class library for C++ providing
 GUI components and other facilities on several popular platforms (and some
 unpopular ones as well).
 .
 This package provides the wxPython version selector.
Share:
15,891

Related videos on Youtube

Rayan Daod
Author by

Rayan Daod

Updated on June 04, 2022

Comments

  • Rayan Daod
    Rayan Daod almost 2 years

    I am currently on GNOME and trying to run playonlinux but unfortunately, when I try to launch it, I get this :

    "Looking for python... 2.7.11 - Traceback (most recent call last):
      File "/usr/share/playonlinux/python/check_python.py", line 1, in <module>
        import os, wxversion
    ImportError: **No module named wxversion**
    failed tests
    Looking for python2.7... 2.7.11 - Traceback (most recent call last):
      File "/usr/share/playonlinux/python/check_python.py", line 1, in <module>
        import os, wxversion
    ImportError: **No module named wxversion**
    failed tests
    Looking for python2.6... 
    Looking for python2... 2.7.11 - Traceback (most recent call last):
      File "/usr/share/playonlinux/python/check_python.py", line 1, in <module>
        import os, wxversion
    ImportError: **No module named wxversion**
    failed tests
    Please install python before trying to run this program"
    

    I tried to reinstall Python and Playonlinux but it did not work.

    I have python-wxgtk3.0 already installed but when I list all the python packages I have with a little python script, it does not appear ...

    My version of Python is 2.7.11.

    Does someone know what I can do please ?

    Thank you,

    Rayan

  • Rayan Daod
    Rayan Daod over 6 years
    Hello, thank you for your answer. I actually already installed this package. But when python tries to import the corresponding package, it does not find it ... I used a little script to list the python modules I have but wx/wxversion is not in the list.
  • Rayan Daod
    Rayan Daod over 6 years
    Hello, thank you for your answer. I tried the command line you posted ("sudo pip install --upgrade --pre -f wxpython.org/Phoenix/snapshot-builds wxPython"), but I get a big error message. I uploaded the error here : justpaste.it/errorwxpythonlinux as i didn't find the solution yet (if someone can help me to debug this). I also tried the 1st link you posted, and the written commands are based on a library url that does not exist anymore :/ (apt.wxwidgets.org) Concerning the last link, it explains the procedure for mac users, and I am actually on linux ^^ Any other advice pls? Thx
  • Rolf of Saxony
    Rolf of Saxony over 6 years
    sudo apt list | grep python-wxversion python-wxversion/xenial,xenial,now 3.0.2.0+dfsg-1build1 all [installed,automatic]
  • Rayan Daod
    Rayan Daod over 6 years
    Running this command line I get this : python-wxversion/yakkety,yakkety,now 3.0.2.0+dfsg-3 all [installed]. How can I install the version you wrote pls ?
  • Rayan Daod
    Rayan Daod over 6 years
    I ran "apt-cache madison python-wxversion" to list all the realeases of it, that is what I get : python-wxversion | 3.0.2.0+dfsg-3 | ch.archive.ubuntu.com/ubuntu yakkety/universe amd64 Packages python-wxversion | 3.0.2.0+dfsg-3 | ch.archive.ubuntu.com/ubuntu yakkety/universe i386 Packages
  • Rolf of Saxony
    Rolf of Saxony over 6 years
    Find wxversion.py on your box and either make a local copy or ensure than it is in /usr/lib/python2.7/dist-packages, if you have a standard installation. The apt differences will be down to differing repositories between our operating systems.