Linux安装Python GUI库 wxPython

参考https://www.cnblogs.com/gaowengang/p/10847075.html

https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04/

https://blog.csdn.net/android_lover2014/article/details/72888401?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522159024820419725211950508%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=159024820419725211950508&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2blogfirst_rank_v2~rank_v25-1-72888401.nonecase&utm_term=%E5%9C%A8Ubuntu%E7%B3%BB%E7%BB%9F%E4%B8%8B%E5%AE%89%E8%A3%85%E4%BD%BF%E7%94%A8Python%E7%9A%84GUI%E5%B7%A5%E5%85%B7wxPy

pip install -U wxPython是不行的
试试 sudo apt install python-wxtools
测试以下代码:

import wx

app = wx.App(False) #创建1个APP,禁用stdout/stderr重定向
frame = wx.Frame(None, wx.ID_ANY, "Hello, World!")  #这是一个顶层的window
frame.Show(True)    #显示这个frame
app.MainLoop()

如果报错libjpeg.so.8: cannot open shared object file: No such file or directory
https://blog.csdn.net/weixin_41587491/article/details/105479822
sudo apt-get install libjpeg9

你可能感兴趣的:(Linux安装Python GUI库 wxPython)