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