环境:
安装报错:
解决: 1.sudo apt-get install libgtk-3-dev -y
2.sudo apt-get install freeglut3-dev libgstreamer-plugins-base1.0-dev -y
3.sudo pip3 install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04/wxpython
如果出现域名解析暂时失败,再执行一次即可:
4.运行python3,import wx检查是否可用,如果报ImportError: libpng12.so.0: cannot open shared object file: No such file or directory
或者ImportError: libjpeg.so.8: cannot open shared object file: No such file or directory
库文件不全,运行以下命令即可(如果卸载了wps,再安装回来):
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/kingsoft/wps-office/office6" >>~/.bashrc &&source ~/.bashrc