11

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

2 Answers 2

18

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.

Sign up to request clarification or add additional context in comments.

1 Comment

-s flag (silent) for curl should be helpful in case you plan to use that in some automation script or tool, so that it will not blame you with download progress.
3

Another way to install pip:

sudo python -m ensurepip

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.