为了更好使用coco数据集,需要安装coco api
起初的方法参考博客:https://blog.csdn.net/gzj2013/article/details/82385164
git clone https://github.com/pdollar/coco.git
cd coco/PythonAPI
# 如果使用的是 python2, 运行下面的命令:
make -j8
# 如果使用的是 python3, 需要更改 Makefile:
vi Makefile
# 将 Makefile 中的 python 改为 python3, 然后:
make -j8
然后报错:error: command 'gcc' failed with exit status 1
之后尝试
python setup.py install
结果相同。
多数博客给出的解决方案是:
yum install gcc python-devel
或者
sudo apt-get install python3-dev
等等类似
,尝试后均无效。
参考自: