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

前端 未结 2 933
一整个雨季
一整个雨季 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:12

    if you are using windows. type in powershell or terminal:

    python -m pip install WHATEVER
    
    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题