7

I need to install pip3, but cannot do it without sudo privileges which I don't have.
I have tried wget https://bootstrap.pypa.io/get-pip.py but that gets me the other version of pip.

1
  • What python version? Versions newer than 3.4 already have pip bundled, just run python -m pip <command>. In that case, you don't need to install pip via get-pip.py script as suggested in the answer.
    – hoefling
    Commented May 25, 2018 at 6:44

2 Answers 2

11

You can install pip3 without root previlege as follow:

wget https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py --user

pip3 will be installed locally under /home/$USER/.local/bin/.

Check the installed version:

$HOME/.local/bin/pip3 -V

or

PATH=$PATH:$HOME/.local/bin
pip3 --version

sample output:

pip 10.0.1 from /home/$USER/.local/lib/python3.6/site-packages/pip (python 3.6)
2
  • 1
    Isntall typo first line
    – Prvt_Yadav
    Commented May 28, 2018 at 18:51
  • 1
    I installed pip like this, and right now I have to remove it right now. How can I do that ? It is located in HOME/.local/bin
    – Goktug
    Commented Feb 20, 2019 at 9:08
0

If you need pip3 to install packages for python3, you can use pip to install packages for specific versions of python. You could try:

python3.6 get-pip.py

and then:

python3.6 -m pip install <package>

replacing for your version of python and the package.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .