Installing Pip in Ubuntu – A how to

The Linux folks are pretty much comfortable with the command line as we all are aware, hence this tool called “Pip” might come handy. So firstly, let me tell you that this tool helps to install software packages written in Python. Pip stands for “Pip install packages”. It can be also used to install packages listed in Python Package Index (PyPI).

Now make sure that you have Python 2 and Python 3 packages installed if not then run the below commands and install them.

python2 --version

Now, install pip for Python 2 using this command:

sudo apt install python-pip

It will install pip and a number of other dependencies with it. Once installed, verify that you have pip installed correctly.

pip --version

It should show you a version number, something like this:

pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)

Now all is good to go.

To search packages from the Python Package Index, the link as shown above or click here, you can use the following pip command:

pip search <search_string>

For example, if you search for stress, it will show all the packages that have the string ‘stress’ in its name or description, that is we want to search a package named stress terminal.

pip search stress
stress (1.0.0)                - A trivial utility for consuming system resources.
s-tui (0.8.2)                 - Stress Terminal UI stress test and monitoring tool
stressypy (0.0.12)            - A simple program for calling stress and/or stress-ng from python
fuzzing (0.3.2)               - Tools for stress testing applications.
stressant (0.4.1)             - Simple stress-test tool
stressberry (0.1.7)           - Stress tests for the Raspberry Pi
mobbage (0.2)                 - A HTTP stress test and benchmark tool
stresser (0.2.1)              - A large-scale stress testing framework.
cyanide (1.3.0)               - Celery stress testing and integration test support.
pysle (1.5.7)                 - An interface to ISLEX, a pronunciation dictionary with stress markings.
ggf (0.3.2)                   - global geometric factors and corresponding stresses of the optical stretcher
pathod (0.17)                 - A pathological HTTP/S daemon for testing and stressing clients.
MatPy (1.0)                   - A toolbox for intelligent material design, and automatic yield stress determination
netblow (0.1.2)               - Vendor agnostic network testing framework to stress network failures
russtress (0.1.3)             - Package that helps you to put lexical stress in russian text
switchy (0.1.0a1)             - A fast FreeSWITCH control library purpose-built on traffic theory and stress testing.
nx4_selenium_test (0.1)       - Provides a Python class and apps which monitor      and/or stress-test the NoMachine NX4 web interface
physical_dualism (1.0.0)      - Python library that approximates the natural frequency from stress via physical dualism, and vice versa.
fsm_effective_stress (1.0.0)  - Python library that uses the rheological-dynamical analogy (RDA) to compute damage and effective buckling stress in prismatic shell structures.
processpathway (0.3.11)       - A nifty little toolkit to create stress-free, frustrationless image processing pathways from your webcam for computer vision experiments. Or observing your cat.

If you want to install an application using pip, you can use it in the following manner:

pip install <package_name>

Pip doesn’t support tab completion so the package name should be exact.

If you want to remove a Python package installed via pip, you can use the remove option in pip.

pip uninstall <installed_package_name>

That’s it ! thank you for reading.