Objective
The objective is to PIP the python package management system on Ubuntu 18.04 Bionic beaver
Operating System and Software Versions
- Operating System: – Ubuntu 18.04 Bionic beaver
Requirements
Privileged access to your Ubuntu System as root or via sudo
command is required.
Conventions
- # – requires given linux commands to be executed with root privileges either directly as a root user or by use of
sudo
command - $ – requires given linux commands to be executed as a regular non-privileged user
Other Versions of this Tutorial
Instructions
Install PIP
PIP is not installed by default on Ubuntu 18.04, however, the installation of PIP is simple. Open up terminal and enter:
$ sudo apt update $ sudo apt install python-pip
The above command will install PIP for Python 2.X Confirm the installation:
$ pip --version pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)
Install PIP3
In case you need PIP3 along with a higher Python 3.X version you can install PIP3 using the following linux command.
$ sudo apt update $ sudo apt install python3-pip
Confirm the installation:
$ pip3 --version pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)
Basic Usage
The following lines will illustrate a basic usage and syntax of PIP command. To search packages index execute:
pip search KEYWORD
to search for packages. Once you obtain the package name use pip
to install it:
$ pip install PACKAGE_NAME
Lastly, to remove package enter:
$ pip uninstall PACKAGE_NAME