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

前端 未结 8 1512
独厮守ぢ
独厮守ぢ 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

    It is due permission problem,

    sudo chown -R $USER /path to your python installed directory
    

    default it would be /usr/local/lib/python2.7/

    or try,

    pip install --user -r package_name
    

    and then say, pip install -r requirements.txt this will install inside your env

    dont say, sudo pip install -r requirements.txt this is will install into arbitrary python path.

提交回复
热议问题