[英]Error: Failed building wheel for wxpython-phoenix while installing wx
I am trying to install wxpython (I have python 3.5.2(32Bit) and Windows 10(64Bit)) I tried : pip install wx
and i get: Failed building wheel for wxpython-phoenix 2 times and then a big error line-->我正在尝试安装 wxpython(我有 python 3.5.2(32Bit) 和 Windows 10(64Bit))我试过:
pip install wx
,我得到:wxpython-phoenix 的构建轮失败 2 次,然后是一个大错误行—— >
I also tried installing Anaconda, but it did not help.How can I overcome the problem ?我也尝试安装 Anaconda,但没有帮助。我该如何克服这个问题?
There's a lot of questions about failed installations on windows, probably because the packages are compiled when installed, and sometimes the compilation fail when the compiler is not properly configured.关于windows上安装失败的问题很多,可能是因为安装时编译了包,有时编译器配置不正确导致编译失败。 I admit I decided to let the specialized people handle it.
我承认我决定让专门的人来处理。
As a nice workaround, you can grab the already built distribution at the official wxpython website located here :作为一个不错的解决方法,您可以在位于此处的官方 wxpython 网站上获取已经构建的发行版:
Python 3.5 32/64 bit windows: Python 3.5 32/64 位窗口:
just download the .whl
file and do for example:只需下载
.whl
文件并执行例如:
C:\python35\scripts\pip install wxPython_Phoenix-3.0.3.dev2700+c524ed1-cp35-cp35m-win_amd64.whl
For linux you need to go here first对于 linux 你需要先去这里
https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ https://extras.wxpython.org/wxPython4/extras/linux/gtk3/
Then grab your linux version and do the install.然后获取您的 linux 版本并进行安装。
(base) fsdfsdfd@linux:~/Downloads$ pip install wxPython-4.1.1-cp38-cp38-linux_x86_64.whl (base) fsdfsdfd@linux:~/Downloads$ pip install wxPython-4.1.1-cp38-cp38-linux_x86_64.whl
Processing ./wxPython-4.1.1-cp38-cp38-linux_x86_64.whl Requirement already satisfied: pillow in /home/orangel/miniconda3/lib/python3.8/site-packages (from wxPython==4.1.1) (8.1.2) Requirement already satisfied: numpy;处理 ./wxPython-4.1.1-cp38-cp38-linux_x86_64.whl 要求已经满足:/home/orangel/miniconda3/lib/python3.8/site-packages 中的枕头(来自 wxPython==4.1.1) (8.1. 2)已满足要求:numpy; python_version >= "3.0" in /home/orangel/miniconda3/lib/python3.8/site-packages (from wxPython==4.1.1) (1.20.1) Requirement already satisfied: six in /home/orangel/miniconda3/lib/python3.8/site-packages (from wxPython==4.1.1) (1.15.0)
python_version >= "3.0" in /home/orangel/miniconda3/lib/python3.8/site-packages (from wxPython==4.1.1) (1.20.1) 要求已经满足:6 in /home/orangel/miniconda3/ lib/python3.8/site-packages(来自 wxPython==4.1.1)(1.15.0)
Installing collected packages: wxPython安装收集的包:wxPython
Successfully installed wxPython-4.1.1成功安装 wxPython-4.1.1
if does not works, please try this如果不起作用,请尝试这个
sudo apt install libwxgtk3.0-gtk3-dev sudo apt 安装 libwxgtk3.0-gtk3-dev
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.