Python Forum
Installing pip on linux
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Installing pip on linux
#6
I have a video on how to install Python on YouTube[1]. I also have a blog post[2] on my website. The basic steps are

sudo apt-get update

Now that the package lists have been updated we can upgrade to the latest versions with the apt-get upgrade command:

sudo apt-get -y upgrade

Once the packages have been upgraded, we can install Python 3.7. This is done with the apt-get install command:

sudo apt-get install -y python3.7

Once the installation is complete, we confirm that it was successful by calling Python 3.7 and printing out the version number:

python3.7 -V

# expected output
Python 3.7.3

Now we have successfully completed the installation of Python. Since we want to work with other Python packages in the future, we can now install the package management program PIP. For this we execute the following command:

sudo apt-get install -y python3-pip

In the following, we make sure that Python 3.7 is the latest python3 version. To achieve that we set a symbolic link to python3.

sudo ln -sf /usr/bin/python3.7 /usr/bin/python3

Once PIP has been installed we have to update PIP. Unfortunately we have to do this manually although we have just installed PIP, cause the installed version is pretty old, so yes, this step is necessary:

python3 -m pip install --upgrade pip

Once the installation is complete we also confirm this by calling the version number of PIP:

python3 -m pip -V

# expected output
pip 19.2.1 from /home/vagrant/.local/lib/python3.7/site-packages/pip (python 3.7)

Now we are still testing if we can actually install libraries with PIP. For this we use a very popular Python math library named numpy

python3 -m pip install numpy

[1]: https://youtu.be/PKUrhVqEpxE
[2]: https://techdiffuse.com/en/2019/08/06/py...o-install/
Reply


Messages In This Thread
Installing pip on linux - by sylas - Oct-14-2018, 05:07 AM
RE: Installing pip on linux - by wavic - Oct-14-2018, 06:06 AM
RE: Installing pip on linux - by sylas - Oct-14-2018, 06:29 AM
RE: Installing pip on linux - by wavic - Oct-14-2018, 08:06 AM
RE: Installing pip on linux - by sylas - Oct-14-2018, 08:16 AM
RE: Installing pip on linux - by michaellossagk - Aug-11-2019, 08:31 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  installing uPyCraft IDE on Mx-Linux apollo 4 5,105 Oct-14-2019, 04:36 PM
Last Post: Larz60+
  Installing the Visual Studio Code on Linux - how to do that!? apollo 4 3,286 Oct-05-2019, 09:48 PM
Last Post: apollo
  installing Linux on Flash Drive Larz60+ 9 6,957 Sep-18-2017, 02:03 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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