Archlinux:pip:ImportError:无法导入名称'requests'

时间:2018-07-26 15:53:31

标签: python pip archlinux

我使用pip安装的某些python软件包与我尝试使用pacman安装的另一个软件包存在冲突。因此,我决定卸载所有使用pip安装的软件包。我用所有软件包制作了requirements.txt文件,并开始卸载它们。它工作了一段时间,但最终出现了这个错误:

Traceback (most recent call last):
  File "/usr/bin/pip", line 11, in <module>
    load_entry_point('pip==10.0.1', 'console_scripts', 'pip')()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 479, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2703, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2321, in load
    return self.resolve()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2327, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3.6/site-packages/pip/_internal/__init__.py", line 42, in <module>
    from pip._internal import cmdoptions
  File "/usr/lib/python3.6/site-packages/pip/_internal/cmdoptions.py", line 16, in <module>
    from pip._internal.index import (
  File "/usr/lib/python3.6/site-packages/pip/_internal/index.py", line 15, in <module>
    from pip._vendor import html5lib, requests, six
ImportError: cannot import name 'requests'

此后每次尝试运行pip时,我都会遇到类似的错误。

0 个答案:

没有答案