首先确定好自己的python支持哪些版本的whl文件
链接:https://pan.baidu.com/s/1jlLKQWH3D-YTUcohi6F0dA?pwd=abc1
提取码:abc1
内含
wxPython-4.2.0-cp37-cp37m-win_amd64.whl
wxPython-4.2.0-cp38-cp38m-win_amd64.whl
wxPython-4.2.0-cp39-cp39m-win_amd64.whl
wxPython-4.2.0-cp310-cp310m-win_amd64.whl
ModuleNotFoundError:no module named "wx_core"怎么解决,
直接pip安装报错
× Encountered error while trying to install package.
╰─> wxPython
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
WXpython安装教程
下面附上链接下载whl文件然后自行安装,官网卡的不行
于是我把所有版本都下载了,放网盘,需要自己拿
这种whl文件安装的时候,我习惯性放桌面
就是这样的,然后再CMD里输入:cd desktop
然后输入 pip install wxPython-4.2.0-cp38-cp38-win64.whl
它提示
whl is not a supported wheel on this platform在此平台上不受支持。
1.首先更新pip命令为:python -m pip install --upgrade pip
2.在CMD里查看pip支持哪些文件名命令为:pip debug --verbose
我的支持这些文件安装
换个包然后在CMD里输入: pip install wxPython-4.2.0-cp39-cp39-win64.whl
这是文件名全称,根据python版本不一样下载不一样的版本
安装完import wx在pycharm报错
ModuleNotFoundError: No module named 'wx._core'
不知道怎么解决了,有说安装
安装Microsoft Visual C++ 2015 Redistributable Update 3
然后,重装python后,成功了
import wx 就成功了