Ubuntu安装pycocotools报错问题
安装pycocotools时我们会遇见如下问题:
ERROR: Could not build wheels for pycocotools which use PEP 517 and cannot be installed
产生这个问题的原因是因为:
- gcc和g++没有配置好;
- pycocotools的安装需要基于gcc和g++才可以运行;
解决办法如下:
sudo apt update //更新包列表
sudo apt install build-essential //安装build-essential软件包
最后使用pip命令来安装pycocotools
pip install pycocotools -i https://pypi.tuna.tsinghua.edu.cn/simple