error: could not create '/usr/local/lib/python2.7/dist-packages/virtualenv_support': Permission denied

前端 未结 9 881
情歌与酒
情歌与酒 2020-12-13 05:35

I am using ubuntu 12.04 and I am trying to pip install virtualenv but suddenly I got this error.

samuel@sampc:~$ pip install virtualenv
Downloading/unpacking         


        
相关标签:
9条回答
  • 2020-12-13 06:16

    use

    sudo pip install virtualenv
    

    You have a permission denied error. This states your current user does not have the root permissions.So run the command as a super user.

    0 讨论(0)
  • 2020-12-13 06:19

    I've heard that using sudo with pip is unsafe.

    Try adding --user to the end of your command, as mentioned here.

    pip install packageName --user
    

    I suspect that installing with this method means the packages are not available to other users.

    0 讨论(0)
  • 2020-12-13 06:22

    pip is not give permission so can't do pip install.Try below command.

    apt-get install python-virtualenv
    
    0 讨论(0)
  • 2020-12-13 06:26

    First, sudo pip install 'package-name' means nothing it will return

    sudo: pip: command not found
    

    You get the Permission denied, you shouldn't use pip install as root anyway. You can just install the packages into your own user like mentionned above with

    pip install 'package-name' --user
    

    and it will work as you intend. If you need it in any other user just run the same command and you'll be good to go.

    0 讨论(0)
  • 2020-12-13 06:27

    You don't have permission to the Python folder.

    sudo chown -R $USER /usr/local/lib/python2.7
    
    0 讨论(0)
  • 2020-12-13 06:27

    Use

    sudo pip install virtualenv
    

    Apparently you will have powers of administrator when adding "sudo" before the line... just don't forget your password.

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