Is sudo required for easy_install pip on OS X Lion?

I come from Snow Leopard to work at the Lion installation at home. I do not remember that:

sudo easy_install pip 

Is it required for Leo? I had errors until I did this, and pip turned out to be here:

 [ some@computer ] ~ $ which pip /usr/local/bin//pip 

Does this mean that I will have to sudo pip install other packages? eg:.

 sudo pip install virtualenv sudo pip install virtualenvwrapper 

I should also note that I am running Xcode 4.3 with a new separate installation of command line tools. So I don’t have // ​​a developer path right now in my volume of X Lion OS.

+6
source share
2 answers

Yes. Typically, you use sudo pip. You could change a bunch of permissions, and you might not need it, but that could break all kinds of things. If you want to avoid re-entering your password, try opening

"sudo screen" first. Then your shell will be registered as root and will not ask for a password. (Using the sudo screen will allow you to run pip and other admin commands without re-entering sudo)

+5
source

Actually, since Python 2.6 has a command line switch that allows you to use pip without the need for sudo.

Try-user:

 pip install --user <package_name> 

You can also add --user to any script update that may be available as

 pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install --user -U 
+2
source

Source: https://habr.com/ru/post/909425/


All Articles