Das Forum

ImportError: No module named wxversion

Autor Antworten
qweqweqwe Monday 4 May 2015 at 18:38
qweqweqweAnonymous

When I try to run Play on Linux I get the following error: 

 

Looking for python... 2.7.9 - 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.5 - 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.5 - 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 have also python 2.7, 3.4 installed on my system.

petch Monday 4 May 2015 at 18:47
petch

Ronin DUSETTE Monday 4 May 2015 at 19:17
Ronin DUSETTE

I am surprised it was not pulled in at install time as a dependency. What distro are you using?


Please:
Post debug logs & full computer specs in first post
No private messages for general help, use the forums
Read the wiki, Report broken scripts
qweqweqwe Tuesday 30 June 2015 at 19:29
qweqweqweAnonymous

Ubuntu 15.04.

Also, i have install wxPython

qweqweqwe Tuesday 30 June 2015 at 19:54
qweqweqweAnonymous

Ubuntu 15.04.

Also, i have install wxPython

petch Tuesday 30 June 2015 at 19:56
petch

petch Tuesday 30 June 2015 at 21:34
petch

The only way I managed to reproduce this problem was by getting PlayOnLinux from git cloning, is that what you used?

qweqweqwe Wednesday 1 July 2015 at 14:05
qweqweqweAnonymous

http://nguyenph88.blogspot.com/2014/04/how-to-install-wxpython.html - install guide to wxPython

 

 

https://www.playonlinux.com/en/download.html - install guide to playonlinux

petch Wednesday 1 July 2015 at 15:29
petch

Well, if you follow Ubuntu 12.04 instructions to install packages on Ubuntu 15.04, and reply to my questions with URLs, I'll stop here...

But I suspect you install PlayOnLinux using git, which is definitely not what you should be doing if you don't know what you're doing.

Admittedly this download page can be confusing, I reported it already in March 2014

 

Editiert von: petch

petch Thursday 2 July 2015 at 1:56
petch

Ok, shortest path to fix: open the Ubuntu Software Center, install PlayOnLinux.

That won't install the latest version available (it will probably install 4.2.5 those days), but that should get you something work. With 4.2.5 installed system-wide, you should even be able to run the development version from your cloned git repository.

If you want to install 4.2.8 system-wide, scroll down the download page a bit, click on "Ubuntu" and follow the installation instructions for the most recent Ubuntu release. I think it doesn't link Utopic Unicorn or Vivid Vervet, but Trusty Tahr instructions should work just fine.

MajorLunaC Thursday 3 December 2015 at 1:20
MajorLunaCAnonymous

This thread might be a little old, but I have the exact same problem on Slackware 14.1 . I ran ldconfig afterwards too. I've seen several dozen threads in other forums with the exact same problem and no clear solution. I think the checker system is not finding it well, and might need some tweaking.

  • I have Python installed in:

usr/lib64/pkgconfig/python-2.7.pc
usr/lib64/libpython2.7.so.1.0
usr/lib64/python2.7/

[...]

  • I have wxPython installed (afterwards) in:

/usr/include/wx-3.0/wx/xrc/xh_simplebook.h
/usr/lib64/libwx_baseu-3.0.so.0.2.0
/usr/lib64/libwx_baseu_net-3.0.so.0.2.0
/usr/lib64/libwx_baseu_xml-3.0.so.0.2.0
/usr/lib64/libwx_gtk2u_adv-3.0.so.0.2.0
/usr/lib64/libwx_gtk2u_aui-3.0.so.0.2.0
/usr/lib64/libwx_gtk2u_core-3.0.so.0.2.0
/usr/lib64/libwx_gtk2u_gl-3.0.so.0.2.0
/usr/lib64/libwx_gtk2u_html-3.0.so.0.2.0
/usr/lib64/libwx_gtk2u_media-3.0.so.0.2.0
/usr/lib64/libwx_gtk2u_propgrid-3.0.so.0.2.0
/usr/lib64/libwx_gtk2u_qa-3.0.so.0.2.0
/usr/lib64/libwx_gtk2u_ribbon-3.0.so.0.2.0
/usr/lib64/libwx_gtk2u_richtext-3.0.so.0.2.0
/usr/lib64/libwx_gtk2u_stc-3.0.so.0.2.0
/usr/lib64/libwx_gtk2u_xrc-3.0.so.0.2.0

petch Thursday 3 December 2015 at 18:37
petch

The check does not try to guess paths, you can check in python/check_python.py that it basically tried to import wxversion, then wx:

import os, wxversion
print("wxversion(s): " + ", ".join(wxversion.getInstalled()))

if os.environ["POL_OS"] != "Mac":
    wxversion.ensureMinimal('2.8')

import wx
os._exit(0)

Then this script is tried with a list of Pythor interpreters ("python", "python2.7", "python2.6", "python2") see bash/find_python

That's all there's to it.

Editiert von: petch

MajorLunaC Thursday 3 December 2015 at 23:34
MajorLunaCAnonymous

Ok, that's all nice and good, but then how do I get it to detect and import wxversion and wx?

My best guess is that wxPython didn't install properly (even though a standard install, like hundreds of other programs I installed, was performed). Is that the issue? If so, I'll take up my argument with them. What's the directory structure for wxPython supposed to be like?