Python之wxPython

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/cadi2011/article/details/84861830

1、工具要用GUI,对比了一圈,觉着wxPython靠谱

2、wxPython安装

https://pypi.org/project/wxPython/#files下载whl文件

命令行

pip install wxPython-4.0.3-cp27-cp27m-macosx_10_6_intel.whl

3、踩坑了

  Could not find a version that satisfies the requirement PyPubSub (from wxPython==4.0.3) (from versions: )
No matching distribution found for PyPubSub (from wxPython==4.0.3)

4、要求装PyPubSub

https://pypi.org/project/PyPubSub/#files

命令行

pip install Pypubsub-4.0.0-py3-none-any.whl 
Pypubsub-4.0.0-py3-none-any.whl is not a supported wheel on this platform

5、继续踩坑

Pypubsub版本不支持哥哥的平台,哥最后装了3.3.0版本

6、难道是这个原因?

pip install wxPython
Collecting wxPython
  Could not fetch URL https://pypi.python.org/simple/wxpython/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:661) - skipping
  Could not find a version that satisfies the requirement wxPython (from versions: )
No matching distribution found for wxPython
wpdeMacBook-Pro:Downloads wp$ 

7、又提示哥哥缺少six包

 Could not find a version that satisfies the requirement six (from wxPython==4.0.3) (from versions: )
No matching distribution found for six (from wxPython==4.0.3)

8、怒装 six 包 https://pypi.org/project/six/#files

9、Pypubsub、six,这俩包在2.7x版本装的哥哥好费劲,不是pip install失败,就是不好使,还好哥哥知道pip的本地安装办法,牛逼成功

Installing collected packages: wxPython
Successfully installed wxPython-4.0.3

10、接着踩坑 pycharm,成功导入

import wx找不见模块(参考我导入appium那篇文章)

11、hello world 继续踩坑

This program needs access to the screen. Please run with a
Framework build of python, and only when you are logged in
on the main display of your Mac.

猜你喜欢

转载自blog.csdn.net/cadi2011/article/details/84861830
今日推荐