Python Error fix-ERROR: Could not install packages due to an EnvironmentError: [Errno 13] 权限不够的解决办法

时间:2024-03-24 08:39:36

>Could not install packages due to an EnvironmentError: [Errno 13] 权限不够的解决办法

报错如下:

ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: ‘/usr/local/lib/python3.5/dist-packages/pip’
Consider using the --user option or check the permissions.
Python Error fix-ERROR: Could not install packages due to an EnvironmentError: [Errno 13] 权限不够的解决办法
解决办法1:
安装的时候添--user参数
例如:pip install --upgrade pip --user
Python Error fix-ERROR: Could not install packages due to an EnvironmentError: [Errno 13] 权限不够的解决办法
解决办法2:
进入自己虚拟环境就可以了。
使用conda env list查看你这个用户的虚拟环境
Python Error fix-ERROR: Could not install packages due to an EnvironmentError: [Errno 13] 权限不够的解决办法
然后启动虚拟环境conda activate 虚拟环境名字
Python Error fix-ERROR: Could not install packages due to an EnvironmentError: [Errno 13] 权限不够的解决办法