码迷,mamicode.com
首页 > 其他好文 > 详细

cannot import name 'main' 解决方案

时间:2018-08-07 13:58:17      阅读:146      评论:0      收藏:0      [点我收藏+]

标签:install   方案   ase   python3   sid   int   解决方案   use   recent   

error description:

pip3 install numpy
Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in <module>
    from pip import main
ImportError: cannot import name ‘main‘

 

You must have inadvertently upgraded your system pip (probably through something like sudo pip install pip --upgrade)

pip 10.x adjusts where its internals are situated. The pip3 command you‘re seeing is one provided by your package maintainer (presumably debian based here?) and is not a file managed by pip.

You can read more about this on pip‘s issue tracker

You‘ll probably want to not upgrade your system pip and instead use a virtualenv.

To recover the pip3 binary you‘ll need to

 sudo python3 -m pip uninstall pip && sudo apt install python3-pip --reinstall

If you want to continue in "unsupported territory" (upgrading a system package outside of the system package manager), you can probably get away with python3 -m pip ... instead of pip3.

cannot import name 'main' 解决方案

标签:install   方案   ase   python3   sid   int   解决方案   use   recent   

原文地址:https://www.cnblogs.com/sddai/p/9436502.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!