Could not install packages due to an Environment Error: [Errno 13] Permission denied 解决方案

执行pip install 报错如下:

Could not install packages due to an Environment Error: [Errno 13] Permission denied: '/usr/local/lib/python3.5/dist-packages/kiwisolver.cpython-35m-x86_64-linux-gnu.so' Consider using the `--user` option or check the permissions.

 

解决方案:

Linux / macOS

From your terminal, you can install the package for your user only, like this:

pip install <package> --user

OR

You can use su or sudo from your terminal, to install the package as root:

sudo pip install <package>

Windows

From the Command Prompt, you can install the package for your user only, like this:

pip install <package> --user

OR

You can install the package as Administrator, by following these steps:

  1. Right click on the Command Prompt icon.
  2. Select the option Run This Program As An Administrator.
  3. Run the command pip install <package>

 

    原文作者:stardsd
    原文地址: https://www.cnblogs.com/sddai/p/10209931.html
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞