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

前端 未结 2 1934
眼角桃花
眼角桃花 2021-01-16 01:43

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:22

    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)
  • 2021-01-16 02:23

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

    python -m pip install WHATEVER
    
    0 讨论(0)
提交回复
热议问题