Cloud Service >> Knowledgebase >> General >> Installing Pip on Ubuntu 16.04 LTS
submit query

Cut Hosting Costs! Submit Query Today!

Installing Pip on Ubuntu 16.04 LTS

The Pip command line tool is an essential utility for installing and managing Python packages from the Python Package Index. Pip allows you to install specific package versions, manage full lists of dependencies through a requirements file, and handle binary packages. While Python may come with Pip by default, you can also install Pip separately on systems like Ubuntu 16.04.

 

Once installed, Pip provides commands to search for packages, install and uninstall them, freeze package versions for reproducibility, and more. Compared to Python's easy_install, Pip offers more robust package management capabilities and has become the tool of choice for Python dependency and environment management. Its ability to resolve dependencies from requirements files and install exact package versions makes Pip a critical tool for Python developers and administrators.

Install Pip on Ubuntu 16.04

This guide covers installing Pip for Python on Ubuntu 16.04. It assumes you have a basic knowledge of Linux, are comfortable using the shell, and have root access to your own Ubuntu 16.04 VPS. If you do not have root privileges, you may need to use 'sudo' before the commands.

 

The Pip installation process on Ubuntu 16.04 is straightforward. This walkthrough will take you through the steps required to get Pip set up and ready to manage Python packages on your Ubuntu server. With Pip installed, you'll have access to simple commands for searching, installing, uninstalling, and otherwise managing Python libraries and applications.

 

Step 1. First, update all system packages by running these apt-get commands in the terminal:

 

sudo apt-get update

sudo apt-get upgrade

Step 2. Installing Pip.

Install the pip by using apt-get command:

apt-get install python-pip

After installing Pip, verify it was successful by running:

pip -V

Step 3. How to use pip command.

Once python-pip is installed, the pip command will be available. Pip supports various options including:

To install new python package type:

pip install packageName

To uninstall python package installed by pip type:

pip uninstall packageName

To search python package type:

pip search packageName

To view more pip options and usage examples, use the --help flag:

- [[email protected] ~]# pip --help

- Usage:

pip [options]

 

- Commands:

- install Install packages.

- uninstall Uninstall packages.

- freeze Output installed packages in requirements format.

- list List installed packages.

- show Show information about installed packages.

- search Search PyPI for packages.

- wheel Build wheels from your requirements.

- zip DEPRECATED. Zip individual packages.

- unzip DEPRECATED. Unzip individual packages.

- bundle DEPRECATED. Create pybundles.

- help Show help for commands.

 

General Options:

- -h, --help Show help.

- -v, --verbose Give more output. This option can be used up to 3 times to add multiple values.

- -V, --version Show version and exit.

- -q, --quiet Give less output.

- --log-file Path to a verbose non-appending log, that only logs failures. This

- log is active by default at /home/sharad/.pip/pip.log.

- --log Path to a verbose appending log. This log is inactive by default.

- --proxy Specify a proxy in the form [user:passwd@]proxy.server:port.

- --timeout Set the socket timeout (default 15 seconds).

- --exists-action Default action when a path already exists: (s)witch, (i)gnore,

- (w)ipe, (b)ackup.

- --cert Path to alternate CA bundle.

- [[email protected] ~]#

 

Congratulation’s! You have successfully installed Pip. Thanks for using this tutorial for installing Pip Python on Ubuntu 14.04 system. For additional help or useful information, we recommend you to check the official Python web site.

 

To install Libraries

Using the following commands, Pip can install 3rd party packages like Django, Tensorflow, Numpy, Pandas, etc.

pip install

To search for Libraries

Using command lines you can also search for other libraries in Python repository. For example, we are taking Django packages, so the search command will show a similar list as shown below :

pip search django

django-bagou (0.1.0) - Django Websocket for Django

django-maro (0.0.2) - `django-maro` is utility for django.

django-hooked (0.1.7) - WebHooks for Django and Django Rest Framework.

django-ide (0.0.5) - A Django app to develop Django apps

django-mailwhimp (0.1) - django-mailwhimp integrates mailchimp into Django

django-six (1.0.4) - Django-six —— Django Compatibility Library

django-umanage (1.1.1) - Django user management app for django

django-nadmin (0.1.0) - django nadmin support django version 1.8 based on django-xadmin

diy-django (1.3.1) - diy-django

To uninstall a library

In case you don’t need a library then you can uninstall easily using the following command :

pip uninstall

Summary

In this tutorial, we have installed Pip on Ubuntu 16.04 using the Ubuntu repositories. We covered basic Pip commands for searching, installing, and managing Python packages. With Pip set up on your Ubuntu system, you can now easily find and install Python libraries and applications to assist you. Pip opens up a world of Python software to enhance your projects and workflows.

Cut Hosting Costs! Submit Query Today!

Grow With Us

Let’s talk about the future, and make it happen!