参考链接:
https://blog.youkuaiyun.com/u013591306/article/details/79458220
https://blog.youkuaiyun.com/gxiaoyaya/article/details/78363391(果然不能只看Windows还是Ubuntu的解决办法!!!)
1.首先需要进入虚拟环境(进入Venv/bin):
cd ~/下载/Venv/bin
``
source ./activate
cd ~
2.下载安装包
git clone https://github.com/pdollar/coco.git

3.进入PythonAPI目录
cd coco/PythonAPI
4.编译安装ipython
make -j8
5.进一步编译
# install pycocotools locally
python setup.py build_ext --inplace
# install pycocotools to the Python site-packages
python setup.py build_ext install
注意:(1)一定要确保你进入的是虚拟环境(前面是(Venv))

(2)python setup.py build_ext install 最后两步我是执行了以后才跑通的。