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

前端 未结 8 1660
独厮守ぢ
独厮守ぢ 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 23:13

    Option a) Create a virtualenv, activate it and install:

    virtualenv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
    

    Option b) Install in your homedir:

    pip install --user -r requirements.txt
    

    My recommendation use safe (a) option, so that requirements of this project do not interfere with other projects requirements.

提交回复
热议问题