在使用conda运行pytorch示例的时候,报错
ModuleNotFoundError: No module named 'pycocotools'
于是搜索了一下,尝试安装pycocotools,试了如下方案,均产生了其他报错,均安装失败
# 方案1(无效)
conda install pycocotools
# 方案2(无效)
activate base
pip install pycocotools
# 方案3(无效)
activate base
pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
最后使用如下方案成功了,根据自己系统的情况二选一即可
# linux-64, win-64
conda install pycocotools -c Esri
# linux-ppc64le, linux-64, linux-aarch64, osx-arm64, osx-64
conda install pycocotools -c conda-forge