最近写了一篇关于“微软开源分布式高性能GB框架LightGBM安装使用”的文章,有小伙伴安装python环境遇到了问题。我个人也尝试安装了一下,确实遇到了很多问题。
scipy库的安装
1、执行命令:pip install scipy
可能会提示类似下面的信息:
Installing collected packages: scipy
Running setup.py install for scipy
Complete output from command D:\Python27\python.exe -c "import setuptools, t
okenize;__file__='c:\\users\\qxyz\\appdata\\local\\temp\\pip-build-ivmlo4\\scip
y\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().repla
ce('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\qxyz\appdata\lo
cal\temp\pip-tizlof-record\install-record.txt --single-version-externally-manage
d --compile:
Note: if you need reliable uninstall behavior, then install
with pip instead of using `setup.py install`:
- `pip install .` (from a git repo or downloaded source
release)
- `pip install scipy` (last SciPy release on PyPI)
lapack_info:
libraries lapack not found in ['D:\\Python27\\lib', 'C:\\', 'D:\\Python27\
\libs']
NOT AVAILABLE
lapack_src_info:
NOT AVAILABLE
NOT AVAILABLE
D:\Python27\lib\site-packages\numpy\distutils\system_info.py:639: UserWarnin
g: Specified path C:\projects\numpy-wheels\windows-wheel-builder\atlas-builds\at
las-3.11.38-sse2-64\lib is invalid.
warnings.warn('Specified path %s is invalid.' % d)
D:\Python27\lib\site-packages\numpy\distutils\system_info.py:1532: UserWarni
ng:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.__doc__)
D:\Python27\lib\site-packages\numpy\distutils\system_info.py:1543: UserWarni
ng:
也可能提示需要:numpy,可以执行命令安装:pip install numpy
pip安装时下载超时怎么办?
这个问题解决了,可能还有其它问题。
lapack not found 这个怎么办?怎么用pip命令安装?
lapack 貌似没办法使用pip命令安装!
CentOS下有安装依赖的方法(未验证):
yum install lapack lapack-devel blas blas-devel
Ubuntu下有安装依赖的方法(未验证):
sudo apt-get install python python-dev libatlas3-base-dev gcc gfortran g++
但Windows下没有找到。
不过有另一种方法,使用“.whl”安装包安装“scipy”。
“scipy”下载地址:http://www.lfd.uci.edu/~gohlke/pythonlibs/f9r7rmd8/scipy-0.18.1-cp27-cp27m-win_amd64.whl
“http://www.lfd.uci.edu/~gohlke/pythonlibs/”是个不错的站,很多包在上面都可以找到。
下载完成后可以用以下命令安装:
切换到文件对应的目录下
pip install scipy-0.18.1-cp27-cp27m-win_amd64.whl
======================文档信息======================
版权声明:非商用自由转载-保持署名-注明出处
署名(BY) :testcs_dn(微wx笑)
文章出处:[无知人生,记录点滴](http://blog.csdn.net/testcs_dn)