Professional Documents
Culture Documents
How To Install Pip On Ubuntu 18.04 - Linuxize
How To Install Pip On Ubuntu 18.04 - Linuxize
Centos 7
How to deploy Odoo 12 on Ubuntu 18.04
Debian 9
How to deploy Odoo 11 on Ubuntu 18.04
SHARE
Installing pip for Python 3
Ubuntu 18.04 ships with Python 3, as the default Python installation. Complete the
following steps to install pip ( pip3 ) for Python 3:
01. Start by updating the package list using the following command:
The command above will also install all the dependencies required for building Python
modules.
03. Once the installation is complete, verify the installation by checking the pip version:
$ pip3 --version
The version number may vary, but it will look something like this:
Output
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)
Python 2 is not installed by default in Ubuntu 18.04. To install Python 2 and pip for Python
2, complete the following steps:
The command above will install Python2, Pip and all the dependencies required for
building Python modules.
$ pip --version
The version number may vary, but it will look something like this:
Output
pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)
You should install Python modules globally using pip only if there is no package available
through the package manager.
Replay
In most cases, you should use pip within a virtual environment only. Python Virtual
Environments allows you to install Python modules in an isolated location for a speci c
project, rather than being installed globally. This way you do not have to worry about
affecting other Python projects.
In this section, we show you a few useful basic pip commands. With pip, we can install
packages from PyPI, version control, local projects, and from distribution les but in most
cases, you will install packages from PyPI.
$ pip3 --help
You can get more information about a speci c command using pip <command> --help .
For example to get more information about the install command, type:
Let’s say you want to install a package called scrapy which is used for scraping and
extracting data from websites.
To install the latest version of the package you need to run the following command:
To install a speci c version of the package you would issue the following command:
requirement.txt is a text le that contains a list of pip packages with their versions
which are required to run a speci c Python project.
To list all the installed pip packages use the command below:
$ pip3 list
To upgrade an already installed package to the latest version use the following command:
Conclusion
In this tutorial, you have learned how to install pip on your Ubuntu machine and how to
manage Python packages using pip. For more information about pip, visit the pip user
guide page.
report this ad
Buy me a coffee
Sign up to our newsletter and get our latest tutorials and news
straight to your mailbox.
How to deploy Odoo 12 on Ubuntu How to deploy Odoo 11 on Ubuntu How to install Odoo 11 on Ubuntu
18.04 18.04 16.04