This comprehensive Linux guide expects that you run the following commands as root user but if you decide to run the commands as a different user then ensure that the user has
sudo
access and that you precede each of the privileged commands withsudo
pip is a standard package-management system used to install and manage software packages written in Python. Many packages can be found in the default source for packages and their dependencies — Python Package Index. Most distributions of Python come with pip preinstalled.
In this tutorial, we will guide you about how to install Python pip on your Ubuntu 18.04 system. Follow the instructions below.
Before installing pip on your Ubuntu 18.04, you need to update your yum repository cache by running the following command
root@codesposts:~$ apt update
Now, run the following command to install Python pip on your system.
root@codesposts:~$ apt install python-pip
You can verify the version of the pip installed on your system by running the following command.
root@codesposts:~$ pip --version
pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)
If you want to install the Python3 pip instead of the Python2 pip, you can run the command below
root@codesposts:~$ apt install python3-pip
Run the following command to verify the version of pip3 installed on your system.
root@codesposts:~$ pip3 --version
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)
To install a package using the pip, run the command like below
root@codesposts:~$ pip install twitter
OR
root@codesposts:~$ pip3 install twitter
Replace the “twitter” with the package name you want to install.
You can display the list of all the packages installed on your system using pip by running the command below
root@codesposts:~$ pip list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
asn1crypto (0.24.0)
colorama (0.4.1)
configobj (5.0.6)
cryptography (2.1.4)
enum34 (1.1.6)
idna (2.6)
ipaddress (1.0.17)
IPy (1.0)
keyring (10.6.0)
keyrings.alt (3.0)
pip (9.0.1)
pycrypto (2.6.1)
pyfiglet (0.8.post1)
pygobject (3.26.1)
If you want to remove a package, you can run the command below
root@codesposts:~$ pip uninstall twitter
Replace the “twitter” with the package name you want to install.
The post How To Install Python pip On Ubuntu 18.04 appeared first on CODESPOSTS.COM.
Canonical is continuously hiring new talent. Being a remote- first company, Canonical’s new joiners receive…
What is patching automation? With increasing numbers of vulnerabilities, there is a growing risk of…
Wouldn’t it be wonderful to wake up one day with a desire to explore AI…
Ubuntu and Ubuntu Pro supports Microsoft’s Azure Cobalt 100 Virtual Machines (VMs), powered by their…
Welcome to the Ubuntu Weekly Newsletter, Issue 870 for the week of December 8 –…
Canonical is pleased to announce security patching and support for Valkey through the Ubuntu Pro…