Erlo

ubuntu16 升级pip3后报错File "/usr/bin/pip3", line 9, in <module> from pip import main ImportError: cannot import name 'main'

收藏 2019-03-02 15:56:33   4218   博客园
页面报错/反馈
赞1

问题:ubuntu16 执行pip3 install --upgrade pip之后,pip3执行出错。

Traceback (most recent call last):

File "/usr/bin/pip3", line 9, in <module>
from pip import main
ImportError: cannot import name 'main'

截图如下:

 

问题解决方法:

sudo vi /usr/bin/pip3为下面的代码:

#!/usr/bin/python3
# GENERATED BY DEBIAN

import sys

# Run the main entry point, similarly to how setuptools does it, but because
# we didn't install the actual entry point from setup.py, don't use the
# pkg_resources API.
from pip import __main__
if __name__ == '__main__':
    sys.exit(__main__._main())

 

登录查看全部

参与评论

评论留言

还没有评论留言,赶紧来抢楼吧~~

返回顶部

给这篇文章打个标签吧~

棒极了 糟糕透顶 好文章 PHP JAVA JS 小程序 Python SEO MySql 确认