解决pip升级报错问题

简介: 升级了一下pip,然后:Traceback (most recent call last): File "/usr/bin/pip", line 9, in <module> from pip import mainImportError: cannot import name...
  • 升级了一下pip,然后:

    Traceback (most recent call last):
      File "/usr/bin/pip", line 9, in <module>
        from pip import main
    ImportError: cannot import name main
  • 解决:
  1. 修改/usr/bin/pip

    sudo /usr/bin/pip
  2. 把原文件改为:

    #!/usr/bin/python
    # GENERATED BY DEBIAN
    import sys
    from pip import __main__
    if __name__ == '__main__':
        sys.exit(__main__._main())

    参考链接:时光不写博客

相关文章
|
7月前
pip install -U weditor 安装报错 error: subprocess-exited-with-error
pip install -U weditor 安装报错 error: subprocess-exited-with-error
348 0
|
3月前
|
Linux Shell Python
centos执行pip3 install etcd3报错
centos执行pip3 install etcd3报错
|
3月前
|
缓存 Python
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-npf9报错
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-npf9报错
|
3月前
|
Python
python pip升级3-3
python pip升级3-3
|
4月前
|
安全 IDE 开发工具
Python——记录pip问题(解决下载慢、升级失败问题)
Python——记录pip问题(解决下载慢、升级失败问题)
355 1
|
5月前
|
开发者 Python
【Python】已解决:(Python3中pip无法安装urllib报错问题) ERROR: Could not find a version that satisfies the requireme
【Python】已解决:(Python3中pip无法安装urllib报错问题) ERROR: Could not find a version that satisfies the requireme
329 0
【Python】已解决:(Python3中pip无法安装urllib报错问题) ERROR: Could not find a version that satisfies the requireme
|
5月前
|
安全 网络安全 Python
【Python】已解决:(pip安装库报错)ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访
【Python】已解决:(pip安装库报错)ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访
164 0
|
5月前
|
API 计算机视觉 开发者
【Python】已解决:(pip安装PIL库报错) ERROR: Could not find a version that satisfies the requirement PIL (from v
【Python】已解决:(pip安装PIL库报错) ERROR: Could not find a version that satisfies the requirement PIL (from v
405 0
|
5月前
|
Shell Linux 网络安全
【Python】已完美解决:(pip提示升级)WARNING: There was an error checking the latest version of pip.,
【Python】已完美解决:(pip提示升级)WARNING: There was an error checking the latest version of pip.,
584 0
|
Python
pip安装包报错Could not find a version that satisfies the requirement pymysql (from versions: none)
pip安装包报错Could not find a version that satisfies the requirement pymysql (from versions: none)
749 1

热门文章

最新文章