linux搭建python环境报idna编码错误_Python-无法安装请求[安全]:不允许操作

在Linux环境下使用pip2安装requests的安全组件时遇到权限和编码错误。提示目录权限不足,并建议使用sudo的-H标志。尽管尝试安装,但过程中出现了卸载旧版pyOpenSSL时的权限问题。详细错误信息涉及到多个Python库的已安装和未安装状态。
摘要由CSDN通过智能技术生成

当我尝试运行sudo pip2安装请求[安全]时,出现以下错误:

MacBook-Pro-di-Francesco:~ francesco$sudo pip2 install requests[security]

The directory '/Users/francesco/Library/Caches/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.

The directory '/Users/francesco/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

Collecting requests[security]

Downloading requests-2.12.1-py2.py3-none-any.whl (574kB)

100% |████████████████████████████████| 583kB 406kB/s

Requirement already satisfied: idna>=2.0.0; extra == "security" in /Library/Python/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值