Python 3安裝wxPython

duxingzhe103發表於2020-10-02

今天搭建Python GIS平臺。遇到要安裝wxPython的問題。記錄如下:

錯誤一:

checking for GTK+ - version >= 3.0.0... no

安裝libgtk-3-dev

sudo apt-get install libgtk-3-dev

錯誤二:

configure: error: GStreamer not available

安裝libgstreamer-plugins-base1.0-dev

sudo apt install libgstreamer-plugins-base1.0-dev

錯誤三:

configure: error: OpenGL libraries not available

安裝libgl1-mesa-dev libglu1-mesa-dev

sudo apt install libgl1-mesa-dev libglu1-mesa-dev

sudo apt-get install freeglut3-dev

還有

sudo apt-get install libwebkitgtk-3.0-dev

最後

pip3 install wxPython

附上全部官方依賴:

You will need the following packages (please consult your distributions package list for the appropriate names) and their dependencies:

python-dev (for your version of python)
gtk (preferably version 3, but depends on your needs)
gstreamer
glut
webkitgtk (matching your gtk version)

相關文章