cannot import name 'main' 解决方案
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' 解决方案的更多相关文章
- pip---cannot import name main解决方案
.先来看下Python不同版本对应的路径 which python3. which python3. .使用update-alternatives --install建立链接 sudo update- ...
- Import Error:cannot import name main解决方案
在Ubuntu上安装软件,不小心升级了pip,导致使用时报错如下: Import Error:cannot import name main 后来发现是因为将pip更新为10.0.0后库里面的函数有所 ...
- pip3更新后install package出现ImportError: cannot import name 'main'
linux下pip3更新后,install包出现main不能导入的情况: bear@bear:~/eclipse-workspace/Python-toolbox$ pip3 install pycr ...
- ImportError : cannot import name main
当我们有时候安装不成功插件或者其他模块时候,会有pip报错hu@hu-VirtualBox:~/下载/MySQL-python-1.2.4b4$ pip install pymysqlTracebac ...
- pip install ImportError: cannot import name main
在Ubuntu上用pip install装ansible时报错 root@user:~# pip install --no-cache-dir ansible -i http://mirrors.al ...
- 输入pip命令报错:from pip import main ImportError: cannot import name 'main'
报错信息: qly@qlyComputer:~$ pip Traceback (most recent call last): File "/usr/bin/pip", line ...
- Ubuntu|ython3 :ImportError: cannot import name 'main'
1.问题 root@stephen-K55VD:/usr/bin# pip3 Traceback (most recent call last): File "/usr/bin/pip3&q ...
- 修复服务器上出现ImportError: cannot import name main的问题
在服务器上成功升级pip2之后再运行pip2命令出现如下报错信息 Traceback (most recent call last): File "/usr/bin/pip2.7" ...
- ubuntu升级pip后, ImportError: cannot import name ‘main‘
场景描述: 原先pip安装完成之后,一直没有更新版本,原pip版本为8.1.1,今天安装python 包pysftp的时候,提示需要升级pip到(pip 10.0.1); 于是乎,直接手到擒来,终端命 ...
随机推荐
- spark优化之临时目录
官方是这样说的: Directory to use for "scratch" space in Spark, including map output files and RDD ...
- ref:linux用户和组管理,/etc/passwd,/etc/shadow和/etc/group 文件内容解释
ref:https://www.cnblogs.com/xuha0/p/5519232.html 与用户相关的系统配置文件主要有/etc/passwd 和/etc/shadow,其中/etc/shad ...
- jbox小型交互表单(ajax)
function updateval(id){ var url = '${ctx}/zbapp/ranking/zbappRankingList/form?id=${zbappRankingList. ...
- 001.SSH配置文件
一 ssh配置文件路径 1.1 ssh客户端配置文件: 路径:/etc/ssh/ssh_config 1.2 ssh服务端配置文件: 路径:/etc/ssh/sshd_config 二 服务器端常用配 ...
- grid网格系统布局
grid布局: 基于网格的2维布局方法1:display: grid | inline-grid | subgrid作用:启用网格grid容器 grid:定义一个块级的网格容器 inline-grid ...
- View 的滑动
View 的滑动 学习自 <Android开发艺术探索> 滑动漫谈 因为Android手机屏幕大小的原因,所以为了显式更多的信息,我们必须采用滚动的方式来处理,因为滚动就涉及到了滑动,有的 ...
- ArduinoYun教程之OpenWrt-Yun与CLI配置Arduino Yun
ArduinoYun教程之OpenWrt-Yun与CLI配置Arduino Yun OpenWrt-Yun OpenWrt-Yun是基于OpenWrt的一个Linux发行版.有所耳闻的读者应该听说他是 ...
- handlebars.min.js的使用
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- HDU.5181.numbers(DP)
题目链接 参考. \(Description\) 将\(1,2,\cdots,n(n\leq 300)\)依次入栈/出栈,并满足\(m(m\leq 90000)\)个形如\(x\)要在\(y\)之前出 ...
- hdu 1241Oil Deposits(dfs模板)
题目链接—— http://acm.hdu.edu.cn/showproblem.php?pid=1241 首先给出一个n*m的字符矩阵,‘*’表示空地,‘@’表示油井.问在这个矩阵中有多少组油井区? ...