pip,python,ubuntu,linux,..sudo 导致失败问题(sudo -H)
来源:互联网 发布:淘宝首页下拉看懂电影 编辑:程序博客网 时间:2024/06/04 19:47
安装requests库,
之前使用 pip install requests
结果没有sudo,导致失败
后面加了 sudo pip install requests
却提示失败,无法collect……(好坑)
The directory ‘/home/bzy/.cache/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPool(host=’pypi.python.org’, port=443): Read timed out. (read timeout=15)”,)’: /simple/requests/
最后仔细看了下
sudo pip install requests
的报错信息
才知道要加上 -H
sudo -H pip install requests
这样就好了
-H, –set-home
Request that the security policy set the HOME environment
variable to the home directory specified by the target user’s
password database entry. Depending on the policy, this may
be the default behavior.
-H 将环境变数中的 HOME (家目录)指定为要变更身份的使用者家目录(如不加 -u 参数就是系统管理者 root )
- pip,python,ubuntu,linux,..sudo 导致失败问题(sudo -H)
- sudo apt-get install python-pip 失败
- ubuntu下sudo 失败
- linux(ubuntu)sudoers权限错误导致sudo无法使用
- ubuntu 源更新失败问题(sudo apt-get update)
- ubuntu 12.10 sudo apt-get update 失败
- ubuntu sudo apt-get update 失败
- ubuntu sudo apt-get update 失败 解决方法
- ubuntu sudo apt-get update 失败 解决方法
- Ubuntu:sudo apt-get upgrade升级失败
- ubuntu sudo apt-get update 失败 解决方法
- sudo pip install psycopg2
- python 使用 linux shell sudo
- sudo 问题
- Linux sudo
- Linux sudo
- linux-sudo
- linux -- sudo
- d3.js:数据转换篇(二)Associative Arrays(关联数组)篇----v3
- 数据库字段区分大小写问题
- 关于java中Arrays.sort()的几种用法
- 抽象工厂模式
- 如何在项目中查找内存泄漏以及有哪些帮助工具?
- pip,python,ubuntu,linux,..sudo 导致失败问题(sudo -H)
- 【Android7.1.2源码解析系列】Android编译系统翻译------Android_Build_System(/build/core/build-system.html)
- Java基础加强之集合篇(模块记忆、精要分析)
- ps切图方法总结
- 字符串模式匹配算法——BM、Horspool、Sunday、KMP、KR、AC算法
- hihocoder 1054 滑动解锁 dfs
- 选择排序,插入排序和希尔排序总结
- Java 连接池的工作原理
- Vue入门初始化项目