记录自己安装pycotools的过程,可能有些过程不是必须的,下面只是我安装时候的顺序:
1、下载cocoapi包到本地
https://github.com/cocodataset/cocoapi.git
2、cd /cocoapi/PythonAPI/
进入路径
3、输入命令 make
4、出现报错,接下来,我是先安装了cython
输入命令安装,pip install cython
还是报错,报错如下:
error: command ‘x86_64-linux-gnu-gcc‘ failed with exit status 1
5、最后,解决方法如下
sudo apt-get install python3.8-dev # 版本自己根据自己的更改
再重新安装
pip install pycocotools
补充:以上就是全部过程,但不知道 3 4 是不是必须的,仅供参考