python安装库时出现的毛病

一、


C:\Users\tanqingyu>pip install pandas
Collecting pandas
  Downloading https://files.pythonhosted.org/packages/61/c7/f943fceb712579bc538700e2c157dc4972e16abfe29bd4969149bad98c74/pandas-0.24.2-cp37-cp37m-win_amd64.whl (9.0MB)
    100% |████████████████████████████████| 9.0MB 290kB/s
Collecting python-dateutil>=2.5.0 (from pandas)
  Downloading https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl (226kB)
    100% |████████████████████████████████| 235kB 419kB/s
Collecting pytz>=2011k (from pandas)
  Downloading https://files.pythonhosted.org/packages/61/28/1d3920e4d1d50b19bc5d24398a7cd85cc7b9a75a490570d5a30c57622d34/pytz-2018.9-py2.py3-none-any.whl (510kB)
    100% |████████████████████████████████| 512kB 401kB/s
Collecting numpy>=1.12.0 (from pandas)
  Downloading https://files.pythonhosted.org/packages/3a/3c/515afabfe4f29bfc0a67037efaf518c33d0076b32d22ba865241cee295c4/numpy-1.16.2-cp37-cp37m-win_amd64.whl (11.9MB)
    100% |████████████████████████████████| 11.9MB 353kB/s
Collecting six>=1.5 (from python-dateutil>=2.5.0->pandas)
  Downloading https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Installing collected packages: six, python-dateutil, pytz, numpy, pandas
  The script f2py.exe is installed in 'd:Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed numpy-1.16.2 pandas-0.24.2 python-dateutil-2.8.0 pytz-2018.9 six-1.12.0
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

问题:在win10命令提示符中成功执行:pip install panda.

而执行:import panda

>>> import panda
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\lib\site-packages\panda\__init__.py", line 1, in <module>
    from request import PandaRequest
ModuleNotFoundError: No module named 'request'

根据这个错误,找寻了各种技术博客,更改环境变量啊,import sys.path.append()啊。但是还错误。

后来才发现我想安装的是pandas库不是panda库。于是卸载panda后,安装pandas,虽然出现黄色警告:

The script f2py.exe is installed in 'd:Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

但是执行import pandas时运行没毛病。而import pands却出现了问题。话说有panda这个库吗?install没毛病,百度却查不到。估计少用吧。

发现另一个问题:win10的powershell 执行pip install panda 不会出现waring,而在命令提示符里运行里却有。不是说powershell是cmd的超集吗?

二、更改安装源

Conda常用命令及更改安装源_Qy_shsf的博客-CSDN博客_conda命令指定源安装conda自身相关conda --version/ -V #查看当前conda工具版本号conda update conda #更新conda至最新版本conda -h...https://blog.csdn.net/Tanqy1997/article/details/89609090

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值