[Deepin system] Linux system solves the problem that wxPython cannot be installed

1 question

Use import wx to report No module named 'wx'

environment:

python3.6

pip 20.3.3

Directly using pip install wxPython cannot be installed, and an error will be reported.

2 Solutions

Although Deepin is the Debian kernel, the debian version of Wxpython happens to not support python3.6, only Python2.7 and python3.5 and Python3.7. So it is also possible to use the following ubuntu kernel.

method one:

This method is slower to download

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

Method Two:

First download the .whl file and install it locally. https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04/
insert image description here

Then in the terminal, cd to the downloaded whl file and execute

cd ~./Downloads
pip install wxPython-4.0.0-cp36-cp36m-linux_x86_64.whl

Guess you like

Origin blog.csdn.net/weixin_43935696/article/details/123560915