1. 程式人生 > >Python下載numpy和pandas踩過的大坑

Python下載numpy和pandas踩過的大坑

from mic python3 edi ucc directory exe scripts .whl

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

Python下載numpy和pandas踩過的大坑