Python3.5安装numpy,SciPy后,出现ImportError
来源:互联网 发布:子域名查询工具3.0 编辑:程序博客网 时间:2024/06/05 10:03
本来想安装机器学习库scikit-learn,但是发现它要求安装numpy,SciPy,结果花了一整天才配置成功。
1、建议直接到http://www.lfd.uci.edu/~gohlke/pythonlibs/ 中下载对应的numpy,scipy版本,然后在dos环境下,pip install 文件名.whl 即可安装。
如果去PyPI下载的源文件用python setup.py install 安装,则有可能vs版本不匹配而导致编译不通过。
2、安装成功后,可以正常import,但是from scipy import sparse 时报错ImportError: DLL load failed。
这个问题我找了一整天,最后发现也是vs版本不同,导致部分dll缺失:
http://www.lfd.uci.edu/~gohlke/pythonlibs 开头指出:
Many binaries depend on NumPy-1.9+MKL and the Microsoft Visual C++ 2008 (x64, x86, and SP1 for CPython 2.6 and 2.7), Visual C++ 2010 (x64, x86, for CPython 3.3 and 3.4), or the Visual C++ 2015 (x64 and x86 for CPython 3.5) redistributable packages.
但是安装vs2015没能解决这个问题,最后在stackoverflow上找到了答案:
Download the corresponding Microsoft Visual C++ Redistributable Package which should be this one based on your description.
链接:http://stackoverflow.com/questions/33600302/installing-scipy-in-python-3-5-on-32-bit-windows-7-machine
安装Microsoft Visual C++ Redistributable Package后,问题解决。下载地址:
https://www.microsoft.com/en-us/download/details.aspx?id=48145
- Python3.5安装numpy,SciPy后,出现ImportError
- 记录:Python3.5+numpy+scipy安装
- win7安装python3.5、numpy、scipy、matplotlib。
- Windows下Python3.5安装Numpy、Scipy
- Windows下Python3.5安装Numpy、Scipy
- Windows下Python3.5安装Numpy、Scipy
- Python3.x 安装 numpy scipy ...
- Python3安装scipy,numpy,matplotlib
- python3.5下如何安装numpy和scipy?
- python3.6安装numpy,scipy,matplotlib
- linux下python3安装numpy与scipy
- Python3.5 安装scipy
- 机器学习(一)win10+python3.5安装numpy+MKL、scipy、matplotlib、scikit-learn
- (机器学习)win10 python3.5安装numpy,scipy,matplotlib和scikit-learn库
- python3.5下安装numpy,scipy,sklearn,pandas,matplotlib,jieba,requests
- 【python机器学习】Win10+python3.5+numpy+matplotlib+scipy+sklearn的安装
- 安装基于Python3 的NumPy, SciPy, matplotlib和Scikit-Learn
- Windows下安装Python3的numpy、matplotlib、scipy包
- Web Service 教程
- WinPcap笔记(8):分析数据包(2)
- Redis中的排序
- C++Builder实现鼠标钩子
- CodeForces CF 360E Levko and Game 贪心+SPFA
- Python3.5安装numpy,SciPy后,出现ImportError
- max-min fairness 最大最小公平算法
- B. Rebranding
- ubuntu14.04.3 LTS中的atime, ctime, mtime的含义
- 纳兰性德词全集
- linux网络编程
- 11,递归函数
- Qt初学经验总结
- Android编码文件操作相关工具类