Failed to build pycocotools
ERROR
Failed to build pycocotools ERROR: Could not build wheels for pycocotools, which is required to install pyproject.toml-based projects
ERROR: Could not build wheels for pycocotools, which is required to install pyproject.toml-based projects)
错误提示
Failed to build pycocotools
ERROR: Could not build wheels for pycocotools, which is required to install pyproject.toml-based projects
环境
- Ubuntu 22.04 LTS
- python 3.10
解决方法
1.安装 miniconda3
过程可参考这篇文章【AI实战】从零开始搭建中文 LLaMA-33B 语言模型 Chinese-LLaMA-Alpaca-33B
- 安装conda
2.安装pycocotools
conda install -c conda-forge pycocotools
按照提示进行安装即可
3.安装其他依赖
先把 requirements.txt 中的 pycocotools==2.0.4 的#注释一下
再执行:
pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
大功告成!!