Python下载numpy和pandas踩过的大坑

Python下载numpypandas踩过的大坑

 

最直接的安装方法是在pythonscripts中执行 pip install pandas后,能出现Successfull是最好的,这也代表你已完成pandas的安装。下面的内容对你也没有用了。但是一般执行完后,dos窗口会出现各种报错。(Ps:我也是在网上找了各种各样的解决办法,看的人头大。下面是我的解决方法

出现报错:

E:\Python34\Scripts>pip install pandas
Collecting pandas
Using cached https://files.pythonhosted.org/packages/08/01/803834bc8a4e708aede
bb133095a88a4dad9f45bbaf5ad777d2bea543c7e/pandas-0.22.0.tar.gz
Installing build dependencies ... done
Complete output from command python setup.py egg_info:
Could not locate executable g77
Could not locate executable f77
Could not locate executable ifort
Could not locate executable ifl
Could not locate executable f90
Could not locate executable DF
Could not locate executable efl
Could not locate executable gfortran
Could not locate executable f95
Could not locate executable g95
Could not locate executable efort
Could not locate executable efc
don't know how to compile Fortran code on platform 'nt'
non-existing path in 'numpy\\distutils': 'site.cfg'
Running from numpy source directory.
C:\Users\admin\AppData\Local\Temp\easy_install-twd4zdzi\numpy-1.16.0\setup.p
y:390: UserWarning: Unrecognized setuptools command, proceeding with generating
Cython sources and expanding templates
run_build = parse_setuppy_commands()

...............(报错信息太多,这边就不详细写了)

File "C:\Users\admin\AppData\Local\Temp\pip-build-env-2jkgt6h0\Lib\site-pa
ckages\setuptools\command\easy_install.py", line 1146, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: Microsoft V
isual C++ 10.0 is required. Get it with "Microsoft Windows SDK 7.1": www.microso
ft.com/download/details.aspx?id=8279

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\admin\Ap
pData\Local\Temp\pip-install-xuq5rc1u\pandas\

 

我的解决方法:

1、https://www.lfd.uci.edu/~gohlke/pythonlibs/   在该网址查找你自己对应的版本的numpypandas模块下载,需要下载在python的安装路径下的Scripts中。

2、在E:\Python34\Scripts路径上直接输入cmd命令,系统弹出dos窗口,然后执行pip install numpy-1.15.4+mkl-cp34-cp34m-win_amd64.whlnumpy-1.15.4+mkl-cp34-cp34m-win_amd64.whl代表的是你本地下载的numpy版本),执行结果出现Successfully installed numpy-1.15.4+mkl 代表numpy已安装成功。

 

E:\Python34\Scripts>pip install numpy-1.15.4+mkl-cp34-cp34m-win_amd64.whl

Processing e:\python34\scripts\numpy-1.15.4+mkl-cp34-cp34m-win_amd64.whl

Installing collected packages: numpy

Successfully installed numpy-1.15.4+mkl

3、在E:\Python34\Scripts路径上直接输入cmd命令,系统弹出dos窗口,然后执行pip install pandas-0.20.3-cp34-cp34m-win_amd64.whlpandas-0.20.3-cp34-cp34m-win_amd64.whl代表的是你本地下载的pandas版本),执行结果出现Successfully installed installed pandas-0.20.3 python-dateutil-2.7.5 pytz-2018.9 six-1.12.0 代表pandas已安装成功。

 

E:\Python34\Scripts>pip install pandas-0.20.3-cp34-cp34m-win_amd64.whl

Processing e:\python34\scripts\numpy-1.15.4+mkl-cp34-cp34m-win_amd64.whl

Installing collected packages: numpy

Successfully installed numpy-1.15.4+mkl

..............

..............

Collecting six>=1.5 (from python-dateutil>=2->pandas==0.20.3)

  Downloading https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe8

98238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl

Installing collected packages: six, python-dateutil, pytz, pandas

Successfully installed pandas-0.20.3 python-dateutil-2.7.5 pytz-2018.9 six-1.12.0

 

转载于:https://www.cnblogs.com/wanglle/p/10295000.html

你可能感兴趣的:(Python下载numpy和pandas踩过的大坑)