《动手学深度学习》安装mxnet出现问题,首先是下载时使用国内
《动手学深度学习》安装mxnet出现问题,首先是下载时使用国内
在看《动手学深度学习》时,安装mxnet(CPU)版时安装失败。
首先是下载时使用国内镜像,可参考Python安装库太慢?配置好这个速度飞起 - 知乎 (zhihu.com)
下载时出现的问题:
Building wheel for numpy (setup.py) ... error error: subprocess-exited-with-error python setup.py bdist_wheel did not run successfully. error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ ERROR: Failed building wheel for numpy Running setup.py clean for numpy error: subprocess-exited-with-error ERROR: Failed cleaning build dir for numpy Running setup.py install for numpy did not run successfully. error: legacy-install-failure python setup.py bdist_wheel did not run successfully. python setup.py clean did not run successfully. Failed cleaning build dir for numpy error: legacy-install-failure × Encountered error while trying to install package. ╰─> numpy
大概就是以上内容(摘抄了一部分)。我的python版本是3.10 , 百度了好半天,有的说要安装setuptools,wheel,还有说需要安装Microsoft Visual C++ 14.0 ,这里有个替代版本(9条消息) Microsoft Visual C++ 14.0 is required._哈哈哈,冲冲冲的博客-CSDN博客。有的说版本不匹配,要降版本。由于我不懂,所以网上的所有办法都试了,各种安装东西,各种更新版本,最后的版本是python3.10,numpy1.22.4(pip install -U numpy==1.22.4) , wheel(0.40.0) , setuptools(67.6.0) ,这里的numpy是百度的与python3.10匹配的,wheel和setuptools是直接更新的(pip install wheel setuptools --upgrade)。所有的都装完,还是没见效,安装1.7.0 post1 的mxnet未果,又开始试降版本,1.5也不行,1.4也不行。最后是1.2.0成功安装上了。
新手安装,不知道为何出错,由于把所有的步骤都试了,所以没法控制变量知道到底是哪一步起作用了,记录一下有个参考。个人推荐先试试降版本。
相关内容
- 解决python opencv2在pycharm中没有代码提示的问题 (不修改
- python 线程之 threading(三),,python 线程之
- 撩课-Python-每天5道面试题-第2天,,一. 简述编程过程中
- centos6.4下编译安装 python2.7,,1,准备 cento
- python高级编程之选择好名称:pepe8和命名最佳实践,,##
- Mac OSX (EI Capitan)搭建Caffe环境并配置python接口,,Caffe是一
- 如何快速变Python大牛? 该从何学? 看百万年薪工程师解答
- Python初学者,选择Python2还是选择Python3好?,,学习Pytho
- python2和python3的区别,,1,print:py
- Python:编程“八荣八耻”,,以动手实践为荣,以只
评论关闭