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 "", line 1, in
  File "D:\lib\site-packages\panda\__init__.py", line 1, in
    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的超集吗?

 

你可能感兴趣的:(python学习)