Atlantic.Net Blog

How to Install and Use PIP Python Package Manager on Oracle Linux 8

Hitesh Jethva
by Atlantic.Net (447 posts) under Tutorials, VPS Hosting
0 Comments

Python is a free, open-source, high-level programming language used by thousands of developers around the world. PIP is a Preferred Installer Program used for installing and managing additional Python packages via the command line. PIP makes it easier to manage full lists of packages and corresponding version numbers. PIP is a standard package manager that connects to an online repository of public packages, called the Python Package Index, and allows users to install user-defined projects locally with the use of setup.py file.

In this post, we will explain how to install and use PIP on Oracle Linux 8.

Prerequisites

  • A server running Oracle Linux 8 on the Atlantic.Net Cloud Platform
  • A root password configured on your server

Step 1 – Create Atlantic.Net Cloud Server

First, log in to your Atlantic.Net Cloud Server. Create a new server, choosing Oracle Linux 8 as the operating system with at least 2GB RAM. Connect to your Cloud Server via SSH and log in using the credentials highlighted at the top of the page.

Once you are logged in to your server, run the following command to update your base system with the latest available packages.

dnf update -y

Step 2 – Install PIP on Oracle Linux 8

Before installing PIP, Python must be installed on your server. If not installed, you can install it by running the following command:

dnf install python39 -y

After the installation, you can verify the Python version using the following command:

python3.9 --version

You should get the following output:

Python 3.9.7

Next, install PIP using the following command:

dnf install python39-pip -y

Once PIP is installed, you can verify the installed version of PIP using the following command:

pip3 --version

You should see the following output:

pip 9.0.3 from /usr/lib/python3.6/site-packages (python 3.6)

Step 3 – How to Update PIP

It is a good idea to update PIP to the latest version. You can update it using the following command:

pip3 install --upgrade pip

You should see the following output:

Collecting pip
  Downloading https://files.pythonhosted.org/packages/a4/6d/6463d49a933f547439d6b5b98b46af8742cc03ae83543e4d7688c2420f8b/pip-21.3.1-py3-none-any.whl (1.7MB)
    100% |████████████████████████████████| 1.7MB 507kB/s 
Installing collected packages: pip
Successfully installed pip-21.3.1

You can now verify the PIP version again using the following command:

pip3 --version

You should see the following output:

pip 21.3.1 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)

Step 4 – How to Use PIP

To see a list of all important options available with PIP, use the following command:

pip3 --help

You should see the following output:

Usage:   
  pip3  [options]

Commands:
  install                     Install packages.
  download                    Download packages.
  uninstall                   Uninstall packages.
  freeze                      Output installed packages in requirements format.
  list                        List installed packages.
  show                        Show information about installed packages.
  check                       Verify installed packages have compatible dependencies.
  config                      Manage local and global configuration.
  search                      Search PyPI for packages.
  cache                       Inspect and manage pip's wheel cache.
  wheel                       Build wheels from your requirements.
  hash                        Compute hashes of package archives.
  completion                  A helper command used for command completion.
  debug                       Show information useful for debugging.
  help                        Show help for commands.

To install a specific package, run the following command:

pip3 install wheel

To get detailed information about the installed package, run the following command:

pip3 show wheel

You will get the following output:

Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Name: wheel
Version: 0.37.1
Summary: A built-package format for Python
Home-page: https://github.com/pypa/wheel
Author: Daniel Holth
Author-email: [email protected]
License: MIT
Location: /usr/local/lib/python3.6/site-packages
Requires: 
Required-by: 

To get a list of all installed packages, run the following command:

pip3 list

You should see the following output:

Package             Version
------------------- -------
configobj           5.0.6
configshell-fb      1.1.28
dbus-python         1.2.4
decorator           4.2.1
fail2ban            0.11.2
gpg                 1.13.1
isc                 2.0
kmod                0.1
libcomps            0.1.16

To get a list of all outdated packages, run the following command:

pip3 list --outdated

You should see the following output:

Package         Version Latest   Type
--------------- ------- -------- -----
configshell-fb  1.1.28  1.1.29   sdist
dbus-python     1.2.4   1.2.18   sdist
decorator       4.2.1   5.1.1    wheel
kmod            0.1     0.9.2    sdist
ply             3.9     3.11     wheel
PyGObject       3.28.3  3.42.1   sdist
pyparsing       2.1.10  3.0.9    wheel
python-dateutil 2.6.1   2.8.2    wheel
pyudev          0.21.0  0.23.2   wheel
PyYAML          3.12    6.0      wheel
setuptools      39.2.0  59.6.0   wheel
six             1.11.0  1.16.0   wheel
slip            0.6.4   20191113 sdist
urwid           1.3.1   2.1.2    sdist

To uninstall a specific package from your system, run the following command:

pip3 uninstall wheel

Conclusion

In the above article, we explained how to install and use PIP on Oracle Linux 8. We also showed you how to manage Python packages with PIP. You can now easily use PIP to manage the Python dependencies. Try it on VPS hosting from Atlantic.Net!

Get A Free To Use Cloud VPS

Free Tier Includes:
G3.2GB Cloud VPS Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


Looking for a Hosting Solution?

We Provide Cloud, Dedicated, & Colocation.

  • Seven Global Data Center Locations.
  • Flexible Private, Public, & Hybrid Hosting.
  • 24x7x365 Security, Support, & Monitoring.
Contact Us Now! Med Tech Award FTC
SOC Audit HIPAA Audit HITECH Audit

Recent Posts

How to Install and Use Composer on Oracle Linux 8
How to Install Sails.js Framework with Nginx as a Reverse Proxy on Oracle Linux 8
Are Data Breaches In The Cloud Getting Better Or Worse?
How to setup HTTP Strict Transport Security (HSTS) for Apache on Oracle Linux 8
How to Install Kanban Kanboard on Oracle Linux 8

Get started with 12 months of free cloud VPS hosting

Free Tier includes:
G3.2GB Cloud VPS Server Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Dallas, TX

2008 Lookout Dr,

Dallas, Texas 75044

United States

Ashburn, VA

1807 Michael Faraday Ct,

Reston, VA 20190

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4

Canada

London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom

Resources