Today's article has you installing PIP...

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
11,811
Reaction score
10,380
Credits
97,694
You gotta have PIP installed for a couple of articles I want to write, plus it's good to have it installed for Python programs anyhow. So, this covers that, so that I can write other articles and refer to this one.


Feedback is great. I didn't have all the OSes to test on immediately to hand, so some are gathered from searching.
 


Just so others who may be dismayed by the length of the install, can be reassured that all is normal.... a copy of my Terminal screen on entering both commands (separately) for Debian/Ubuntu/derivatives:


brian@brian-desktop:~$ sudo apt install python-pip
[sudo] password for brian:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-pip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
python3-pip

E: Package 'python-pip' has no installation candidate
brian@brian-desktop:~$ sudo apt install python3-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
build-essential g++ g++-9 libc-dev-bin libc6-dev libcrypt-dev libexpat1-dev
libpython3-dev libpython3.8-dev libstdc++-9-dev python-pip-whl python3-dev
python3-distutils python3-setuptools python3-wheel python3.8-dev zlib1g-dev
Suggested packages:
g++-multilib g++-9-multilib gcc-9-doc glibc-doc libstdc++-9-doc
python-setuptools-doc
The following NEW packages will be installed:
build-essential g++ g++-9 libc-dev-bin libc6-dev libcrypt-dev libexpat1-dev
libpython3-dev libpython3.8-dev libstdc++-9-dev python-pip-whl python3-dev
python3-distutils python3-pip python3-setuptools python3-wheel python3.8-dev
zlib1g-dev
0 to upgrade, 18 to newly install, 0 to remove and 0 not to upgrade.
Need to get 20.1 MB of archives.
After this operation, 95.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 https://ubuntu.mirror.digitalpacific.com.au/archive focal-updates/main amd64 libc-dev-bin amd64 2.31-0ubuntu9.7 [71.6 kB]
Get:2 https://ubuntu.mirror.digitalpacific.com.au/archive focal/main amd64 libcrypt-dev amd64 1:4.4.10-10ubuntu4 [104 kB]
Get:3 https://ubuntu.mirror.digitalpacific.com.au/archive focal-updates/main amd64 libc6-dev amd64 2.31-0ubuntu9.7 [2,518 kB]
Get:4 https://ubuntu.mirror.digitalpacific.com.au/archive focal-updates/main amd64 libstdc++-9-dev amd64 9.4.0-1ubuntu1~20.04.1 [1,722 kB]
Get:5 https://ubuntu.mirror.digitalpacific.com.au/archive focal-updates/main amd64 g++-9 amd64 9.4.0-1ubuntu1~20.04.1 [8,420 kB]
Get:6 https://ubuntu.mirror.digitalpacific.com.au/archive focal/main amd64 g++ amd64 4:9.3.0-1ubuntu2 [1,604 B]
Get:7 https://ubuntu.mirror.digitalpacific.com.au/archive focal-updates/main amd64 build-essential amd64 12.8ubuntu1.1 [4,664 B]
Get:8 https://ubuntu.mirror.digitalpacific.com.au/archive focal-updates/main amd64 libexpat1-dev amd64 2.2.9-1ubuntu0.4 [117 kB]
Get:9 https://ubuntu.mirror.digitalpacific.com.au/archive focal-updates/main amd64 libpython3.8-dev amd64 3.8.10-0ubuntu1~20.04.2 [3,950 kB]
Get:10 https://ubuntu.mirror.digitalpacific.com.au/archive focal/main amd64 libpython3-dev amd64 3.8.2-0ubuntu2 [7,236 B]
Get:11 https://ubuntu.mirror.digitalpacific.com.au/archive focal-updates/universe amd64 python-pip-whl all 20.0.2-5ubuntu1.6 [1,805 kB]
Get:12 https://ubuntu.mirror.digitalpacific.com.au/archive focal-updates/main amd64 zlib1g-dev amd64 1:1.2.11.dfsg-2ubuntu1.2 [155 kB]
Get:13 https://ubuntu.mirror.digitalpacific.com.au/archive focal-updates/main amd64 python3.8-dev amd64 3.8.10-0ubuntu1~20.04.2 [510 kB]
Get:14 https://ubuntu.mirror.digitalpacific.com.au/archive focal-updates/main amd64 python3-distutils all 3.8.10-0ubuntu1~20.04 [141 kB]
Get:15 https://ubuntu.mirror.digitalpacific.com.au/archive focal/main amd64 python3-dev amd64 3.8.2-0ubuntu2 [1,212 B]
Get:16 https://ubuntu.mirror.digitalpacific.com.au/archive focal/main amd64 python3-setuptools all 45.2.0-1 [330 kB]
Get:17 https://ubuntu.mirror.digitalpacific.com.au/archive focal/universe amd64 python3-wheel all 0.34.2-1 [23.8 kB]
Get:18 https://ubuntu.mirror.digitalpacific.com.au/archive focal-updates/universe amd64 python3-pip all 20.0.2-5ubuntu1.6 [231 kB]
Fetched 20.1 MB in 2s (10.2 MB/s)
Selecting previously unselected package libc-dev-bin.
(Reading database ... 473738 files and directories currently installed.)
Preparing to unpack .../00-libc-dev-bin_2.31-0ubuntu9.7_amd64.deb ...
Unpacking libc-dev-bin (2.31-0ubuntu9.7) ...
Selecting previously unselected package libcrypt-dev:amd64.
Preparing to unpack .../01-libcrypt-dev_1%3a4.4.10-10ubuntu4_amd64.deb ...
Unpacking libcrypt-dev:amd64 (1:4.4.10-10ubuntu4) ...
Selecting previously unselected package libc6-dev:amd64.
Preparing to unpack .../02-libc6-dev_2.31-0ubuntu9.7_amd64.deb ...
Unpacking libc6-dev:amd64 (2.31-0ubuntu9.7) ...
Selecting previously unselected package libstdc++-9-dev:amd64.
Preparing to unpack .../03-libstdc++-9-dev_9.4.0-1ubuntu1~20.04.1_amd64.deb ...
Unpacking libstdc++-9-dev:amd64 (9.4.0-1ubuntu1~20.04.1) ...
Selecting previously unselected package g++-9.
Preparing to unpack .../04-g++-9_9.4.0-1ubuntu1~20.04.1_amd64.deb ...
Unpacking g++-9 (9.4.0-1ubuntu1~20.04.1) ...
Selecting previously unselected package g++.
Preparing to unpack .../05-g++_4%3a9.3.0-1ubuntu2_amd64.deb ...
Unpacking g++ (4:9.3.0-1ubuntu2) ...
Selecting previously unselected package build-essential.
Preparing to unpack .../06-build-essential_12.8ubuntu1.1_amd64.deb ...
Unpacking build-essential (12.8ubuntu1.1) ...
Selecting previously unselected package libexpat1-dev:amd64.
Preparing to unpack .../07-libexpat1-dev_2.2.9-1ubuntu0.4_amd64.deb ...
Unpacking libexpat1-dev:amd64 (2.2.9-1ubuntu0.4) ...
Selecting previously unselected package libpython3.8-dev:amd64.
Preparing to unpack .../08-libpython3.8-dev_3.8.10-0ubuntu1~20.04.2_amd64.deb ..
.
Unpacking libpython3.8-dev:amd64 (3.8.10-0ubuntu1~20.04.2) ...
Selecting previously unselected package libpython3-dev:amd64.
Preparing to unpack .../09-libpython3-dev_3.8.2-0ubuntu2_amd64.deb ...
Unpacking libpython3-dev:amd64 (3.8.2-0ubuntu2) ...
Selecting previously unselected package python-pip-whl.
Preparing to unpack .../10-python-pip-whl_20.0.2-5ubuntu1.6_all.deb ...
Unpacking python-pip-whl (20.0.2-5ubuntu1.6) ...
Selecting previously unselected package zlib1g-dev:amd64.
Preparing to unpack .../11-zlib1g-dev_1%3a1.2.11.dfsg-2ubuntu1.2_amd64.deb ...
Unpacking zlib1g-dev:amd64 (1:1.2.11.dfsg-2ubuntu1.2) ...
Selecting previously unselected package python3.8-dev.
Preparing to unpack .../12-python3.8-dev_3.8.10-0ubuntu1~20.04.2_amd64.deb ...
Unpacking python3.8-dev (3.8.10-0ubuntu1~20.04.2) ...
Selecting previously unselected package python3-distutils.
Preparing to unpack .../13-python3-distutils_3.8.10-0ubuntu1~20.04_all.deb ...
Unpacking python3-distutils (3.8.10-0ubuntu1~20.04) ...
Selecting previously unselected package python3-dev.
Preparing to unpack .../14-python3-dev_3.8.2-0ubuntu2_amd64.deb ...
Unpacking python3-dev (3.8.2-0ubuntu2) ...
Selecting previously unselected package python3-setuptools.
Preparing to unpack .../15-python3-setuptools_45.2.0-1_all.deb ...
Unpacking python3-setuptools (45.2.0-1) ...
Selecting previously unselected package python3-wheel.
Preparing to unpack .../16-python3-wheel_0.34.2-1_all.deb ...
Unpacking python3-wheel (0.34.2-1) ...
Selecting previously unselected package python3-pip.
Preparing to unpack .../17-python3-pip_20.0.2-5ubuntu1.6_all.deb ...
Unpacking python3-pip (20.0.2-5ubuntu1.6) ...
Setting up python3-distutils (3.8.10-0ubuntu1~20.04) ...
Setting up python3-setuptools (45.2.0-1) ...
Setting up python3-wheel (0.34.2-1) ...
Setting up libcrypt-dev:amd64 (1:4.4.10-10ubuntu4) ...
Setting up python-pip-whl (20.0.2-5ubuntu1.6) ...
Setting up libc-dev-bin (2.31-0ubuntu9.7) ...
Setting up python3-pip (20.0.2-5ubuntu1.6) ...
Setting up libc6-dev:amd64 (2.31-0ubuntu9.7) ...
Setting up libstdc++-9-dev:amd64 (9.4.0-1ubuntu1~20.04.1) ...
Setting up libexpat1-dev:amd64 (2.2.9-1ubuntu0.4) ...
Setting up libpython3.8-dev:amd64 (3.8.10-0ubuntu1~20.04.2) ...
Setting up g++-9 (9.4.0-1ubuntu1~20.04.1) ...
Setting up zlib1g-dev:amd64 (1:1.2.11.dfsg-2ubuntu1.2) ...
Setting up g++ (4:9.3.0-1ubuntu2) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mo
de
Setting up build-essential (12.8ubuntu1.1) ...
Setting up libpython3-dev:amd64 (3.8.2-0ubuntu2) ...
Setting up python3.8-dev (3.8.10-0ubuntu1~20.04.2) ...
Setting up python3-dev (3.8.2-0ubuntu2) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for doc-base (0.10.9) ...
Processing 1 added doc-base file...
brian@brian-desktop:~$
 
Just so others who may be dismayed by the length of the install, can be reassured that all is normal....

I'm legit surprised that you didn't have 'build-essential' installed already. It's pretty much required to compile a ton of stuff. That's one of the first dozen or so things I install when using a distro that requires it.

Hmm... It could just be me.
 


Latest posts

Top