错误"没有名为wxversion的模块"在启动playonlinux时

时间:2017-10-05 16:45:41

标签: python linux wxpython

我目前正在使用GNOME并尝试运行playonlinux但不幸的是,当我尝试启动它时,我明白了:

"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"

我尝试重新安装Python和Playonlinux,但它没有用。

我已经安装了python-wxgtk3.0但是当我列出我用python脚本编写的所有python包时,它没有出现......

我的Python版本是2.7.11。

有人知道我能做什么吗?

谢谢,

RAYAN

3 个答案:

答案 0 :(得分:1)

您可以参考此How to install wxPython

使用pip install wxPython-Phoenix(Linux):

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

SO Post

答案 1 :(得分:0)

python-wxversion可作为单独的套餐提供 使用synapticapt进行安装。

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.

答案 2 :(得分:0)

在wxPython的最新版本(我写这篇文章时为4.0.1)中,不推荐使用wxversion。见https://docs.wxpython.org/MigrationGuide.html#the-wxversion-module

只需删除wxversion导入,或用wx替换,因为我想它只是在导入之前检查wxPython的版本。