Windows 10 上安装wxPython及报错处理方法

Windows 10 上安装wxPython

Python环境:pyhon3.11版本, pip-22.3.1版本

直接安装会报错如下:

 解决方法:

1. pip install attrdict

2. 将<python 安装目录>/Lib/site-packages/attrdict目录下所有.py文件中的

from collections *****

改为

from collections.abc 

3. 安装requests

pip install requests

再次执行pip install wxPython

即可安装成功。

总结主要原因是不同的机器上没有安装wxPython所需的库,或高版本的库不兼容导致

posted on 2023-04-27 10:20  charishi  阅读(460)  评论(0编辑  收藏  举报

导航