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
Raja G
  • 102,391
  • 106
  • 255
  • 328

6 Answers6

3

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

$ sudo apt-get install python-wxgtk2.8
Benjamin
  • 355
  • I ran the command and it told me that I already have the most recent version. – LoadingPleaseWait Jul 26 '14 at 03: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 '14 at 04: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 "", line 1, in ImportError: No module named wxversion`

    – LoadingPleaseWait Jul 28 '14 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 '14 at 05:21
  • I purged then re-installed but I'm still getting the same errors. – LoadingPleaseWait Jul 30 '14 at 15:22
  • 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: http://wiki.wxpython.org/How%20to%20install%20wxPython#Installing_wxPython_from_source – Benjamin Jul 30 '14 at 16:33
  • I reinstalled Ubuntu and now it works normally. – LoadingPleaseWait Sep 01 '14 at 17:28
  • Installing python-wxversion solved it for me (other steps didn't work) – Mark May 25 '15 at 09:21
2

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

sudo apt-get install python-wxtools
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.

guobing li
  • 11
  • 1
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

Raja G
  • 102,391
  • 106
  • 255
  • 328
1

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

drewburr
  • 294
  • 1
  • 15
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.

  • The force version button is grayed out for me. – nukeguy Feb 07 '17 at 22:50
  • Use the repository from the Playonlnux website and try again: https://www.playonlinux.com/en/download.html For the Trusty version Type the following commands:

    wget -q "http://deb.playonlinux.com/public.gpg" -O- | sudo apt-key add - sudo wget http://deb.playonlinux.com/playonlinux_trusty.list -O /etc/apt/sources.list.d/playonlinux.list sudo apt-get update sudo apt-get install playonlinux

    – Ectatomma Feb 09 '17 at 00:41