pycocotools安装失败的解决方案

pycocotools安装失败

一开始就正常的:

pip3 install pycocotools

报错:
在这里插入图片描述
后面尝试了几种方案:

  • 换源:换清华源和豆瓣源,失败
pip3 install pycocotools -i https://pypi.tuna.tsinghua.edu.cn/simple/ --trusted-host pypi.tuna.tsinghua.edu.cn
  • 按GitHub上说的:失败(这两种方案都有可能成功的,但是我连接的服务器一直显示无法连接到GitHub)
pip3 install git+https://github.com/philferriere/cocoapi.git#egg=pycocotools^&subdirectory=PythonAPI
  • 在清华源上下载再本地安装,下载地址:
    https://pypi.tuna.tsinghua.edu.cn/simple/pycocotools/
    安装:pip3 install pycocotools-2.0.0.tar.gz
    失败

  • 最后查看报错信息,发现一条:
    在这里插入图片描述
    因此先执行命令:sudo apt-get install python3.7-dev
    再本地安装:pip3 install pycocotools-2.0.0.tar.gz
    在这里插入图片描述
    成功!

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值