yolov5项目如何安装pycocotools?
部分人运行 pip install -r requirements.txt之后opencv-python和 pycocotools可能还是无法自动安装如下图:
报错:
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionErro
r(’: Failed to establish a new connection: [Errno 11001]
getaddrinfo failed’)’: /pypi/simple/opencv-python/
ERROR: Could not find a version that satisfies therequirement opencv-python (from versions: none)
ERROR: No matching distribution found for opencv-python
解决方法一:
手动pip install pycocotools和pip install opencv-python
注:如果这样就能安装就太好了,不用看下一个解决方法了。
解决方法二:
1安装pycocotools
链接:https://pan.baidu.com/s/19rFLqtOfcF8SAiQR3bIK\_Q
提取码:rf2z
手动下载pycocotoolsb包
将这两个包放到:
安装成功
镜像安装opencv-python
在要安装的环境terminal里面输入:
镜像安装格式
pip install opencv-python -i <你的镜像url>
一般conda使用清华源即输入:
pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple