Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

curl and run python script

Tags:

bash

curl

What is a shorter way to do that:

wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py

?
I tried this:

sudo <(python <(curl https://bootstrap.pypa.io/get-pip.py))

but it returns the error: 'IOError: [Errno 32] Broken pipe'

This works: python <(curl https://bootstrap.pypa.io/get-pip.py) but requires sudo

like image 928
kharandziuk Avatar asked Dec 03 '14 14:12

kharandziuk


1 Answers

curl https://bootstrap.pypa.io/get-pip.py | sudo python -

curl will output given URL to stdout

python - indicate, that source will be taken from stdin.

like image 85
Zada Zorg Avatar answered Oct 08 '22 07:10

Zada Zorg