AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[wxpython](ubuntu)

Martin Hope
Richard Logwood
Asked: 2020-07-18 08:48:25 +0800 CST

PlayOnLinux 不适用于 wxPython 4.1.0 - ImportError:没有名为 wxversion 的模块,需要改为 wx.version

  • 2

最新版本的 wxPython 不支持 wxversion 模块。相反,信息以 wx.version 的形式提供。

有什么建议的解决方法吗?谢谢!

我的环境是 Ubuntu 20.04 LTS、pyenv、python 3.8.3、python 2.7.18、wxPython 4.1.0

$ apt-cache policy playonlinux
playonlinux:
  Installed: 4.3.4-1ubuntu1
  Candidate: 4.3.4-1ubuntu1
  Version table:
 *** 4.3.4-1ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu focal/multiverse i386 Packages
        100 /var/lib/dpkg/status

$ which playonlinux
/usr/bin/playonlinux

# *** note: i'm using pyenv ***

$ pyenv local 2.7.18

$ which python2
/home/dever/.pyenv/shims/python2

$ python2 -V
Python 2.7.18

$ pyenv local 3.8.3

$ which python3
/home/dever/.pyenv/shims/python3

$ python3 -V
Python 3.8.3

安装的 Python 3.8.3 配置有 wxPython 4.1.0

$ python
Python 3.8.3 (default, Jul 16 2020, 20:35:40) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> print(wx.version)
<function version at 0x7ff77d3cbd30>
>>> print(wx.version())
4.1.0 gtk3 (phoenix) wxWidgets 3.1.4
>>> quit()

因此,playonlinux 命令失败并出现以下错误:

$ playonlinux
Looking for python... 3.8.3 - skipped
Looking for python2.7... 2.7.18 - 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.18 - 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

注意:对于那些因为 GTK+ 错误而在 Ubuntu 20.04 LTS 上安装 wxPython 的人*** Could not run GTK+ test program, checking why...

试试这个命令(在这里找到:https ://wxpython.org/pages/downloads/ )

pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-20.04 wxPython

有关其他上下文,另请参阅:https ://discuss.wxpython.org/t/where-to-obtain-wxversion-py/28752

playonlinux 最初安装如下,但在 Ubuntu 20.04 LTS(我从 19.10 升级)上重新安装了标准存储库:

我正在运行的 playonlinux 版本适用于从此处下载的 Ubuntu 18.04(仿生版本):https ://www.playonlinux.com/en/download.html

For the Bionic 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_bionic.list -O /etc/apt/sources.list.d/playonlinux.list
sudo apt-get update
sudo apt-get install playonlinux

也许 playonlinux 被 flatpak 版本取代了?

查看https://www.playonlinux.com上的 Github 链接会将您带到https://github.com/PhoenicisOrg/,这表明解决方案可能是迁移到 flatpak 版本:

https://flathub.org/apps/details/org.phoenicis.playonlinux

python wine gtk3 playonlinux wxpython
  • 2 个回答
  • 2943 Views
Martin Hope
Aliaksandr Adzinets
Asked: 2019-04-20 03:44:47 +0800 CST

配置 wxWidgets 时出现“找不到 pangoxft 库”错误

  • 0

我正在尝试在 Ubuntu 18.10 上配置 wxWidgets 3.0.4:

$ ./configure --with-x11

但是在运行配置脚本时出现错误:

checking for PANGOXFT... configure: error: pangoxft library not found, library cannot be compiled in Unicode mode

是否有包含缺少库的 apt 包,如果有,它的确切名称是什么?


题外话:任何信誉> 300的人都可以创建一个新标签“wxwidgets”并将其添加到标签中(或者如果标签数量必须<5,则可以替换“wxpython”)?

apt unicode configure wxpython pango
  • 1 个回答
  • 399 Views
Martin Hope
Valentyn
Asked: 2018-09-08 08:49:38 +0800 CST

如何安装 wxpython 4 ubuntu 18.04

  • 7

我正在尝试在我的 Ubuntu 18.04 机器上安装 wxPython 4。

sudo pip install wxpython

我首先收到此警告

    The directory '/home/user/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/user/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

并最终出错

Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-SyaTU1/wxpython/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-bzIjlK/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-SyaTU1/wxpython/

我对 wxPython3 有类似的问题,解决方案是使用 get 安装它

sudo apt-get install python-wxgtk-3.0

我还能够为 Python 3 安装 wxPython 4,但不能为 Python 2.7 安装(说明)

另外,我很困惑为什么安装 wxpython 需要这么多 CPU

sudo pip install wxpython

看到这张图片

command-line python wxpython
  • 4 个回答
  • 21721 Views
Martin Hope
Erik Åsland
Asked: 2015-11-09 21:39:04 +0800 CST

安装 wxPython 和“获取 gpg:未找到有效的 OpenPGP 数据”错误

  • 0

我正在尝试在我的计算机上安装 Pylot 并使用 Pylots 网站上的说明。他们的站点要求您安装 wxPython。当我尝试从他们提供的资源中获取时,出现错误。

这是 Pylot 的入门指南:http ://www.pylot.org/gettingstarted.html

它指示 Linux 用户在他们的列表中安装 wxPython,排在第三位。我按照他们提供的资源安装 wxPython ( http://wiki.wxpython.org/InstallingOnUbuntuOrDebian ),当我运行他们的第一行代码时出现错误...

curl http://apt.wxwidgets.org/key.asc | sudo apt-key add -

这是我抛出的错误......

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: apt.wxwidgets.org
gpg: no valid OpenPGP data found.

谁能帮我启动并运行 Pylot?我有一个可怕的时间与它。

wxpython
  • 1 个回答
  • 893 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve