7

When I click on the icon nothing happens. In the terminal when I run playonlinux I get the following.

ImportError: No module named wxversion
Looking for python... 2.7.7 - selected
Traceback (most recent call last):
  File "mainwindow.py", line 31, in <module>
    import wxversion
ImportError: No module named wxversion

6 Answers 6

3

You probably need to install wxpython. Use the following command:

$ sudo apt-get install python-wxgtk2.8
8
  • I ran the command and it told me that I already have the most recent version. Jul 26, 2014 at 3:46
  • That's odd. Go to a new terminal window, type python then once in the python shell, type import wxversion. Make sure that you're running a Python 2.7.x version. If that spits out no errors then you should be fine.
    – Benjamin
    Jul 27, 2014 at 4:09
  • I got Python 2.7.7 (default, Jun 13 2014, 15:15:49) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import wxversion Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named wxversion Jul 28, 2014 at 21:28
  • Okay, that's odd if it says that you have the most recent version. Try doing sudo apt-get purge python-wxgtk2.8, then run the install command again.
    – Benjamin
    Jul 30, 2014 at 5:21
  • 1
    There is also the python-wxversion package you can try installing. If that doesn't fix it, there's also the option of building from source: wiki.wxpython.org/…
    – Benjamin
    Jul 30, 2014 at 16:33
2

I know this is two years old, but what worked for me in 2016 was:

sudo apt-get install python-wxtools
1

If you have installed any python versions from source , then also you can face this problem.

So

Follow these instructions and things should work out:

Open a terminal Ctrl+Alt+T(Open Applications menu, Accessories, Terminal). Run sudo nautilus (no quotes), giving your password when prompted.

Using the file browser that opens, navigate to /usr/local/bin/

Delete the file called python

Go to /usr/bin/

Right-click the file called 'python' and click copy. Paste it into /usr/local/bin/

Go back to '/usr/bin/' and copy 'python2.6' and paste it into /usr/local/bin/

Do the same with the file called python2.6-config

Total credit goes to ubuntuforums.org

1
  • 2
    I have python 2.7. Do I need to download 2.6 or is that fine for this? Jul 26, 2014 at 3:51
1

A little late to the party, but if you still have this issue is is solved here: https://askubuntu.com/a/903047/676362

1

It works for me when I do the following:

  1. comment any PATH settings related to another python path in my ~/.bashrc. Such as the line with "export PATH="/home/***/anaconda2/bin;$PAHT"

  2. restart a terminal and run playonlinux.

1
  • Perfect solution mate
    – Jalpesh
    May 27, 2019 at 12:28
0

I had the same error. My problem was that python-wxversion was on version 3, so I downgraded it to version 2.8.

To do that, I used Synaptic package manager, if you don't have it installed, open a terminal and run sudo apt-get install synaptic

Open Synaptic, then in the search box type python-wxversion, then click on the package, then click on the menu Package and select Force version. A window should appear asking you to select the version you want, choose the 2.8 version and click on Force version and confirm if asked. After that, Synaptic will download and install (downgrade) the package. When done, try to run Playonlinux again.

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .