Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
which pip
#1
Linux Mint by default installs both python 2.7.16 and 3.7.3 and says both will run concurrently.
Using Mint LMDE4 Debian
Django wants python 3.
The Django site says run: pip install Django==3.2.6
The Mint package manager says that the pip for python 2 vs 3 is different.
So how does Mint know which pip to use when "pip install Django==3.2.6" is entered?
Reply
#2
each version (usually) comes packages with it's own version of pip.
On the rare occasion where it's not part of the python package, when you invoke a particular version of python, and then install pip, the install will be for the invoked version.
Reply
#3
(Aug-03-2021, 02:18 AM)Larz60+ Wrote: each version (usually) comes packages with it's own version of pip.
On the rare occasion where it's not part of the python package, when you invoke a particular version of python, and then install pip, the install will be for the invoked version.

Thank you for the response. Mint by default installed python and python3. Neither pip seems to have been installed during the initial Mint install. I'll play with python3 and python in separate sandboxes until I'm comfortable running together.

Aside: Before retiring, I had to always use the latest and greatest version. I personally have a different approach. I can't control where the software will be installed, so I code (when reasonable) to the lowest common denominator.
Reply
#4
(Aug-03-2021, 01:57 PM)oldsalt75 Wrote: Neither pip seems to have been installed during the initial Mint install
Have to install it.
sudo apt install python3-pip
Test with:
pip3 -V
python3 -V
which python3
I think in Linux Mint 20.2(same as Ubuntu 21.04) there is no Python 2(have to install yourself to use it) only Python 3.8.5.
I use pyenv Simple Python Version Management,
then of course it dos matter what Distro has as Python/pip version as you control this yourself.

So here i use Linux Mint 19.1,if want Python 3.9.6 it take about 1-mintute to install and set as system wide version.
(miniforge3-4.10.1-3) tom@tom-VirtualBox:~$ pyenv install 3.9.6
Downloading Python-3.9.6.tar.xz...
-> https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tar.xz
Installing Python-3.9.6...
Installed Python-3.9.6 to /home/tom/.pyenv/versions/3.9.6

(miniforge3-4.10.1-3) tom@tom-VirtualBox:~$ pyenv global 3.9.6
tom@tom-VirtualBox:~$ python -V
Python 3.9.6
tom@tom-VirtualBox:~$ pip -V
pip 21.1.3 from /home/tom/.pyenv/versions/3.9.6/lib/python3.9/site-packages/pip (python 3.9)
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020