[解決]Could not install packages due to an EnvironmentError: [Errno 13] Permission denied

文章目录

  • 問題
  • 解決方法

問題

無法安裝package,會出現權限問題

pip install 
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied:
 '/usr/local/opt/python-3.7.0/lib/python3.7/site-packages/'
Consider using the `--user` option or check the permissions.

解決方法

請選擇自己的pip版本,例如版主是使用pip3.7

方法一: 使用root 安裝

sudo pip3.7 install 

方法二: 安裝但只能本人使用

pip3.7 install  --user

你可能感兴趣的:(python)