安装 wx-tools 和依赖项 Ubuntu 14.04 时出现问题

安装 wx-tools 和依赖项 Ubuntu 14.04 时出现问题

我尝试在 python 2.7.13 中运行一个软件并收到错误“没有名为 wx 的模块”。

因此我正在尝试安装 wxPython 和 wx 相关的依赖项。

我安装的是wxgtk2.8

sudo apt-get install python-wxgtk2.8
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python-wxgtk2.8 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

此链接(https://wiki.wxwidgets.org/Installing_and_configuring_under_Ubuntu) 表示我还需要安装 libwxgtk2.8-dev,但这有问题,因为它依赖于 wx-common。我无法安装 wx-common

sudo apt-get install libwxgtk2.8-dev
The following packages have unmet dependencies:
libwxgtk2.8-dev : Depends: wx-common but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

安装 wx-common 时出现以下错误:

 sudo aptitude install wx-common
The following NEW packages will be installed:
  libwxbase3.1-0-unofficial{ab} wx-common{b} 
0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,127 kB of archives. After unpacking 3,582 kB will be used.
The following packages have unmet dependencies:
 wx-common : Depends: libstdc++6 (>= 5.2) but 4.8.4-2ubuntu1~14.04.4 is installed.
 libwxbase3.1-0-unofficial : Depends: libstdc++6 (>= 5.2) but 4.8.42buntu1~14.04.4 is installed.

这似乎是一个棘手的循环,我不知道如何构建 wx-common 以实现安装 wxPython 的目标。我想以 root 用户身份构建 wxPython,以便可以使用 wx 模块创建虚拟环境。在网上阅读了一些资料后,我发现在虚拟环境中安装 wxPython 非常困难。因此我请求一些以 root 身份安装的帮助。

非常感谢。

如果我尝试安装 wxPython 我会观察到:

checking elsewhere... no
checking for SM... yes
checking for OpenGL headers... not found
checking for GL/gl.h... no
configure: error: OpenGL libraries not available
Error running configure 
ERROR: failed building wxWidgets

这是我的系统:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.5 LTS
Release:    14.04
Codename:   trusty

相关内容