This question already has an answer here:

I have python3 installed in Ubuntu 18.04 and I want to use different modules of python. Can anyone tell me how to install them?

marked as duplicate by N0rbert, Melebius, K7AAY, wjandrea, muru Aug 17 '18 at 2:53

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


pip is the Python package installer. It integrates with virtualenv, doesn't do partial installs, can save package state for replaying, can install from non-egg sources, and can install from version control repositories. The Python Package Index, abbreviated as PyPI, is the official third-party software repository for Python.

Open the terminal and type:

for Python 3.x (python3 is installed by default in Ubuntu 18.04.)

sudo apt install python3-pip

for Python 2.x

sudo apt install python-pip  

After a Python package has been installed by pip install <package-name> or pip3 install <package-name>, you can run the following command to check if it is installed:

pip freeze | grep package-name

Not the answer you're looking for? Browse other questions tagged or ask your own question.