pip install failing with: OSError: [Errno 13] Permission denied on directory

前端 未结 8 1481
独厮守ぢ
独厮守ぢ 2020-11-21 22:43

pip install -r requirements.txt fails with the exception below OSError: [Errno 13] Permission denied: \'/usr/local/lib/.... What\'s wrong and how d

8条回答
  •  感情败类
    2020-11-21 22:54

    If you need permissions, you cannot use 'pip' with 'sudo'. You can do a trick, so that you can use 'sudo' and install package. Just place 'sudo python -m ...' in front of your pip command.

    sudo python -m pip install --user -r package_name
    

提交回复
热议问题