pip and virtualenv (w/o virtualenvwrapper): pip install package_name gives permission denied but using sudo installs globally

前端 未结 2 952
一整个雨季
一整个雨季 2021-01-16 01:41

I have the neurolab package version 0.2.0 in /usr/local/lib/python2.7/dist-packages. Now I would like to install neurolab

2条回答
  •  温柔的废话
    2021-01-16 02:27

    The problem is that your /home/username/.pip/pip.log file is only writable by root, so when you try to use pip as another user you don't have permission to update the log file and the whole operation fails.

    Changing the ownership of the log file (using sudo chown username:username /home/username/.pip/pip.log) or removing it (using sudo rm /home/username/.pip/pip.log) should fix your problem.

提交回复
热议问题