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/
大功告成!!

本文讲述了在Ubuntu22.04和Python3.10环境下,遇到Failedtobuildpycocotools错误时的解决步骤,包括安装miniconda3,然后通过conda安装pycocotools,以及处理requirements.txt中pycocotools版本问题。
2937

被折叠的 条评论
为什么被折叠?



