使用命令“ pip3 install --upgrade pip”升级pip后出现错误,

问题描述 投票:0回答:1

我的python库pandas,numpy,matplotlib较早工作,现在我使用命令pip3 install --upgrade pip用于升级点,下一个“ import pandas命令不起作用”。

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import pandas
  File "/home/desktop/.local/lib/python3.5/site-packages/pandas/__init__.py", line 17, in <module>
    "Unable to import required dependencies:\n" + "\n".join(missing_dependencies)
ImportError: Unable to import required dependencies:
numpy: Something is wrong with the numpy installation. While importing we detected an older version of numpy in ['/home/desktop/.local/lib/python3.5/site-packages/numpy']. One method of fixing this is to repeatedly uninstall numpy until none is found, then reinstall this version.

接下来我试图使用命令sudo pip3 install pandas安装熊猫,我得到以下错误

desktop@desktop-All-Series:~$ sudo pip3 install pandas
WARNING: The directory '/home/desktop/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
WARNING: The directory '/home/desktop/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: pandas in ./.local/lib/python3.5/site-packages (0.25.3)
ERROR: Package 'pandas' requires a different Python: 3.5.2 not in '>=3.5.3'

desktop@desktop-All-Series:~$ pip3 install --upgrade pip
Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in <module>
    from pip import main
ImportError: cannot import name 'main'

我正在使用Ubuntu 16.04如何解决此问题?

python python-3.x pandas pip
1个回答
0
投票

它说pip3不支持。您可以使用此命令。尝试一下,

conda install pandas

也尝试此cmd

pip3 install --upgrade setuptools pip
© www.soinside.com 2019 - 2024. All rights reserved.