本文主要是介绍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
成功!
这篇关于pycocotools安装失败的解决方案的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!