[已解决]报错Could not install packages due to an EnvironmentError

时间:2022-07-25
本文章向大家介绍[已解决]报错Could not install packages due to an EnvironmentError,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

安装OpenCV过程中出现错误 代码:

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

报错内容如下:

Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Users/mac/Anaconda/anaconda3/lib/python3.7/site-packages/cv2/__init__.py'
Consider using the `--user` option or check the permissions.

解决方案:

pip-conda install --user --index-url  https://pypi.douban.com/simple/ opencv-python