6

My python version is 3.70. sudo python3 --version.
I installed pip3 using below command:

sudo apt install python3-pip

But while I checked pip3 version by: pip3 --version

pip 19.0.1 from /usr/local/lib/python3.4/dist-packages/pip (python 3.4)

Why it is not installing for python3.7?

PrakashG
  • 1,623
  • 5
  • 19
  • 28
Rajesh
  • 71
  • 1
  • 1
  • 5
  • because your apt source provide `python3.4` version. upgrade pip version you can try `python3 -m pip install --upgrade pip` – pwxcoo Feb 23 '19 at 13:37
  • Can you also share the result of `which python3` command? – vahdet Feb 23 '19 at 13:39
  • 2
    @pwxcoo i tried your comment, but i got result as `/usr/local/bin/python3: No module named pip` . Also i tried `python3 -m pip3 install --upgrade pip3`, i got result as `/usr/local/bin/python3: No module named pip3` " – Rajesh Feb 23 '19 at 16:38

2 Answers2

16

try the commands mentioned below:

  1. apt install -y python3-pip.

  2. python3.7 -m pip install --upgrade pip

Ankit Gupta
  • 490
  • 6
  • 10
1

if you have your python3.7 already installed, you can set an alias for pip within .bashrc, so that you can simply use pip install ... and be sure that it will install to 3.7

in terminal write gedit /home/$your_user_name$/.bashrc

then add somwhere in the top alias pip3.7='python3.7 -m pip' or alias pip='python -m pip'

Aidos
  • 639
  • 7
  • 18