【问题标题】:Installing wxPython on WSL (with GTK+2)在 WSL 上安装 wxPython(使用 GTK+2)
【发布时间】:2019-11-15 12:52:25
【问题描述】:

我想在 适用于 Linux 的 Windows 子系统上安装 wxPython 软件包(在 Windows 10 上使用 Ubuntu)。首先,我尝试通过pip 安装它,如下所示:

python -m pip install wxpython

在编译过程中失败,因为它找不到 GTK+ 库。所以我通过安装它

apt install libgtk2.0-dev

这很有效,但这对我最初的任务没有帮助。 wxPython 的安装仍然失败,因为它需要 GTK+3。但这在 WSL 上不可用(通过 apt)。所以我想用--gtk2标志从源代码构建wxPython。现在我正在搜索wxPython 4.0.7 的来源,但目前找不到...

有人在WSL上成功安装wxPython吗?

【问题讨论】:

标签: python python-3.x pip wxpython windows-subsystem-for-linux


【解决方案1】:

好的,我发现我通过 WSL 安装了旧版本的 Ubuntu。通过 Microsoft Windows 商店完全删除并重新安装 Ubuntu 应用程序后,我现在可以apt install libgtk-3-dev && pip install wxpython

【讨论】:

    【解决方案2】:

    我正在开发 WSL2(内部版本 21343)、Ubuntu 18.04 我在上面尝试了你的命令,但它对我不起作用。

    这个确实成功安装了wxPython-4.1.1: python -m pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04 wxPython

    【讨论】:

      猜你喜欢
      • 2020-12-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-06-10
      • 2020-11-28
      • 2020-12-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多