I am trying to install python package, but when I try it tells me I need a new version of setup tools. I try to install setup tools following the python software instructions which say to use the curl command. When I do this it gives the error that I don't have permission to install in the directory. How can I use the curl command as a sudo user? I have tried several different ways. I have tried sudo easy_install
and then the url, and also sudo curl
url..
Asked
Active
Viewed 4,445 times
3

Transformer
- 3,642
- 1
- 22
- 33

ratrace123
- 976
- 4
- 12
- 24
-
first do you have curl install in your system – Transformer Feb 02 '16 at 08:21
-
yes i do, i type in man curl and all sorts of things come up – ratrace123 Feb 02 '16 at 08:24
-
@ratrace123 did you try this? http://superuser.com/questions/550414/why-does-sudo-not-work-with-curl – DarthSpeedious Feb 02 '16 at 08:25
-
Yes the link is good... did you try that, the same right way with my answer – Transformer Feb 02 '16 at 08:30
-
yea i tried adding sudo after the pipe: "curl https://bootstrap.pypa.io/ez_setup.py -o - | sudo" and now I get an error saying failed writing body. I think that it solved my original problem about how to run sudo with curl, now I just need to figure this out. – ratrace123 Feb 02 '16 at 08:36
-
why not use wget to get "wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python" – Transformer Feb 02 '16 at 08:42
1 Answers
2
This is the right way to use curl and sudo. use sudo after the pipe
curl | sudo
e.g
curl https://www.opscode.com/chef/install.sh | sudo bash
this might help
curl https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py | sudo python

Transformer
- 3,642
- 1
- 22
- 33