问题解决:Command “python setup.py eg9_ info“ failed with error code 1 in /tmp/pip-build- 0aa4y6yw/aiohtt

问题解决:Command “python setup.py eg9_ info” failed with error code 1 in /tmp/pip-build- 0aa4y6yw/aiohttp/

问题描述

在用pip下载第三方包 geoip2时,报错;在更新pip时依旧报相似错误。

错误信息:
Complete output from command python setup.py egg. info :
Traceback (most recent call last) :
File “”, Line 1,in
File ”/ tmp/pip- build- 0aa4y 6yw/ aiohttp/setup.py", Line 1
NO_ EXTENSIONS: bool = bool(os . environ.get(“AIOHTTP_ NO_ EXTENSIONS” ))
SyntaxError: invalid syntax

Command “python setup.py eg9_ info” failed with error code 1 in /tmp/pip-build- 0aa4y6yw/aiohttp/
You are using pip version 8.1.1, however. version, 24.0 is available
upgrading via the ‘pip install --upgrade pip’ command .

1. pip install 超时

pip install geoip2

在这里插入图片描述
解决:加个清华源

pip install geoip2 -i https://pypi. tuna. ts inghua . edu. cn/simple

2. pip install geoip2报错

Command “python setup.py eg9_ info” failed with error code 1 in /tmp/pip-build- 0aa4y6yw/aiohttp/
You are using pip version 8.1.1, however. version, 24.0 is available upgrading via the ‘pip install --upgrade pip’ command .

在这里插入图片描述

需要更新pip

pip install --upgrade pip -i https://pypi. tuna. ts inghua . edu. cn/simple

3. pip更新报错

在更新pip时依旧报错:Command “python setup.py e9g_ info” failed with error code 1 in / tmp/pip . build LiYunU/pip/

在这里插入图片描述

问题解决

问题原因:在pip21版本开始pip不再支持python2。

解决步骤:

  1. 使用原先旧的执行pip install pip==20.3.3可以直接升级上去
pip install pip==20.3.3
  1. 然后下载第三方包
pip install geoip2 -i https://pypi. tuna. ts inghua . edu. cn/simple

在这里插入图片描述

成功!

在这里插入图片描述

参考

  1. Command “python setup.py egg_info“ failed with error code 1 in /tmp/pip-build-*
  2. 【pip】解决egg_info报错问题&升级pip
  • 16
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值