python安装gevent库出现ERROR: Command errored out with exit status 1

今天安装gevent时出现 ERROR: Command errored out with exit status 1,后面还有一堆错误,好像是说“文件”、setup啊之类的,我在网上花了两小时查了很多方法(例如:升级pip、升级setuptool,然而并没用,难受),最后终于找到一个解决我问题的办法。

1、进入https://www.lfd.uci.edu/~gohlke/pythonlibs/,该网址按照首字母排序,找到自己对应的版本下载下来(我是用的3.8,64位,即下面第一个):
Gevent: a coroutine-based networking library based on greenlet and libev.
Requires greenlet.
gevent‑1.5a2‑cp38‑cp38‑win_amd64.whl
gevent‑1.5a2‑cp38‑cp38‑win32.whl

2、下载对应的whl文件后,在cmd下进入whl所在的文件夹
C:\windows\system32>cd C:\Program Files\Python38\whl

3、最后再输入pip install gevent-1.5a2-cp38-cp38-win_amd64.whl进行安装就可以了。
C:\Program Files\Python38\whl>pip install gevent-1.5a2-cp38-cp38-win_amd64.whl

最后结果:
Processing c:\program files\python38\whl\gevent-1.5a2-cp38-cp38-win_amd64.whl
Requirement already satisfied: cffi>=1.12.2; platform_python_implementation == “CPython” and sys_platform == “win32” in c:\program files\python38\lib\site-packages (from gevent1.5a2) (1.14.0)
Requirement already satisfied: greenlet>=0.4.14; platform_python_implementation == “CPython” in c:\program files\python38\lib\site-packages (from gevent
1.5a2) (0.4.15)
Requirement already satisfied: pycparser in c:\program files\python38\lib\site-packages (from cffi>=1.12.2; platform_python_implementation == “CPython” and sys_platform == “win32”->gevent==1.5a2) (2.20)
Installing collected packages: gevent
Successfully installed gevent-1.5a2

总结一下:其实就是下载一个安装包,然后用指令安装。不过在网上看了几个类似的指令操作,我都没成功(别人可能可以),只有这个我的成功了。希望可以对你有所帮助!欢迎交流讨论!
PS:不好的地方勿喷!谢谢!!!

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 5
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

成小七

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值