Could not install packages due to an EnvironmentError: [Errno 13] Permission denied
程序员文章站
2022-05-31 17:33:21
...
mac在实用pip3安装包时发现报如下异常:
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/3.7'
Consider using the `--user` option or check the permissions.
提示是说,由于环境问题不能安装包,访问库没有权限,你可以考虑使用--user
或者检查权限。
原因是pip执行的是root权限,而当前用户不是,两种方案:
1.让当前用户在root权限下执行:sudo pip3… |
---|
2.让pip3在当前用户下执行:pip3…–user |
推荐阅读
-
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/itsdangerous' C
-
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied
-
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/itsdangerous' C