2

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

Dadep
  • 2,796
  • 5
  • 27
  • 40
Rayan Daod
  • 21
  • 1
  • 1
  • 3

3 Answers3

3

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

Rishi
  • 5,869
  • 7
  • 34
  • 45
  • 1
    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 : https://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 :/ (http://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 – Rayan Daod Oct 07 '17 at 15:47
1

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 <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: wxWidgets Maintainers <freewx-maint@lists.alioth.debian.org>
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.
Rolf of Saxony
  • 21,661
  • 5
  • 39
  • 60
  • 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 Oct 07 '17 at 15:28
  • `sudo apt list | grep python-wxversion` python-wxversion/xenial,xenial,now 3.0.2.0+dfsg-1build1 all [installed,automatic] – Rolf of Saxony Oct 07 '17 at 16:55
  • 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 Oct 07 '17 at 21:39
  • 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 | http://ch.archive.ubuntu.com/ubuntu yakkety/universe amd64 Packages python-wxversion | 3.0.2.0+dfsg-3 | http://ch.archive.ubuntu.com/ubuntu yakkety/universe i386 Packages – Rayan Daod Oct 07 '17 at 21:44
  • 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. – Rolf of Saxony Oct 08 '17 at 08:48
1

In the most recent version of wxPython (4.0.1 as I write this), wxversion is deprecated. See https://docs.wxpython.org/MigrationGuide.html#the-wxversion-module

Just remove the wxversion import, or replace with wx, as I imagine it was just checking the version of wxPython before importing it.

R Snider
  • 11
  • 1