You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows系统中pip安装wxPython失败问题求助(附详细报错日志)

Fixing wxPython Installation Failure on Windows

Hey there! Let's get that wxPython installation sorted out for you. Looking at your error output, two key issues are causing the failure:

1. Missing wheel Package

Your log mentions "由于未安装wheel包,将使用传统的'setup.py install'方式安装wxPython" — using setup.py forces a source code build, which is way more complex and requires extra tools. Let's fix this first:

pip install wheel

2. Missing Microsoft Visual C++ Build Tools

The critical blocking error here is:

distutils.errors.DistutilsPlatformError: 需要Microsoft Visual C++ 14.2或更高版本。请通过"Microsoft C++ Build Tools"获取...

Even with wheel installed, some packages still need these build tools to install properly. You don't need the full Visual Studio suite — just download the Microsoft C++ Build Tools and make sure to select the Desktop development with C++ workload during installation. This will install all the compilers and libraries wxPython requires.

3. Reinstall wxPython

Once you've set up both wheel and the build tools, run the install command again:

pip install -U wxPython

If You Still Run Into Issues

If source compilation still gives you trouble, try using a pre-compiled wheel file (matched to your Python version and Windows architecture). Download the correct .whl file for your setup, then install it directly with:

pip install path/to/your/wxPython-wheel-file.whl

That should get wxPython up and running smoothly for you!

内容的提问来源于stack exchange,提问作者Snorlax

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.28 19:09:06