栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

ubuntu下pip安装失败

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

ubuntu下pip安装失败

1、文件权限问题,在pip前添加sudo,有时候文件太大或者网络不好也会报类似的错
Command “/usr/bin/python3 -u -c “import setuptools, tokenize;file=’/tmp/pip-build-0jtgof/pillow/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’rn’, ‘n’);f.close();exec(compile(code, file, ‘exec’))” install --record /tmp/pip-gsjsjvcr-record/install-record.txt --single-version-externally-managed --compile --user --prefix=” failed with error code 1 in /tmp/pip-build-0jtgof/pillow/

2、找不到安装包重新在试一下可能是网不好,报错一般看第一行或者最后一行就好了
Can’t rollback pillow, nothing uninstalled.
Command “/usr/bin/python3 -u -c “import setuptools, tokenize;file=’/tmp/pip-build-uo3ae5cm/pillow/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’rn’, ‘n’);f.close();exec(compile(code, file, ‘exec’))” install --record /tmp/pip-dt2xx084-record/install-record.txt --single-version-externally-managed --compile” failed with error code 1 in /tmp/pip-build-uo3ae5cm/pillow/

TypeError: unsupported operand type(s) for -=: ‘Retry’ and ‘int’
连续报错可能就是网络不好可以换镜像或者在安装路径后面加上国内镜像包的地址

pip3 install 安装包名字 -i 安装包镜像地址   #一定要对应版本和操作系统

报错一定要学会分析报错,不然百度有时候也不能解决问题而且费时费力,一般像这种超时报错就多试一下或者换镜像

如果是大量路径报错可能是版本不兼容或者是文件权限问题

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/649115.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号