python numpy和pandas库的区别_Python下载numpy和pandas踩过的大坑

Python下载numpy和pandas踩过的大坑

最直接的安装方法是在python的scripts中执行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/ 在该网址查找你自己对应的版本的numpy和pandas模块下载,需要下载在python的安装路径下的Scripts中。

2、在E:\Python34\Scripts路径上直接输入cmd命令,系统弹出dos窗口,然后执行pip install numpy-1.15.4+mkl-cp34-cp34m-win_amd64.whl(numpy-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.whl(pandas-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 installpandas-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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值