安装报错:Could not install packages due to an OSError: [Errno 2] No such file or directory: ‘\\METADATA‘

安装指令:

pip install opencv-python -i https://pypi.douban.com/simple/

报错如下:

ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'd:\\anaconda3\\envs\\pytorch\\lib\\site-packages\\numpy-1.21.6.dist-info\\METADATA'

解决方法:

按照报错中的路径 找到:“numpy-1.21.6.dist-info”并删除

即可成功安装:

猜你喜欢

转载自blog.csdn.net/m0_52583356/article/details/129713463