Installing pip on an Ubuntu Linux Machine
An engineer in Bangalore🇮🇳 dabbling with code. This is just my tiny corner of the Internet where I'm trying to collect my thoughts... Occasionally blogging about new things I learn 🧠
Search for a command to run...
An engineer in Bangalore🇮🇳 dabbling with code. This is just my tiny corner of the Internet where I'm trying to collect my thoughts... Occasionally blogging about new things I learn 🧠
No comments yet. Be the first to comment.
A comprehensive beginner-friendly Introduction to Version Control using Git

This article is a follow-up explanation of how I recently fixed the issue of the Wi-Fi network spontaneously disappearing on my Lenovo Ideapad 330 laptop running Ubuntu 20.04.I first encountered this issue almost three years ago, on the same laptop r...
I needed to test sending emails with SendGrid using Python, but as per the docs, it needed Python 3.8 be able to do so. At that time, my machine had Python 3.11 installed. So, I needed to switch my Python version for the assignment. This is when we u...
A quick tutorial on setting up and building first React Native App project on Ubuntu
A Quick tutorial on setting up Android Studio on Ubuntu for Native App Development
If you have just installed a new Ubuntu 20.04 Operating System on your machine, you should find it having Python3 pre-installed. Now, to start installing and using external packages in your Python projects, you would need pip installed on your machine as well.
One of the easiest ways to install pip is to install the package python3-pip via the apt repositories with the command:
sudo apt install python3-pip
or using apt-get with the command:
sudo apt-get python3-pip
This will install pip for all users in the /usr/bin/ path.
However, sometimes users may not have root (or sudo) privileges and can not simply run:
sudo apt-get install python-pip
In such a situation, users can still install and use pip without root (or sudo) access in a local directory by following the below steps:
wget:wget https://bootstrap.pypa.io/get-pip.py
bash
python3 get-pip.py --userbash
This will install pip on your local directory in your home (~/.local/bin).cd ~/.local/bin
pip now to start downloading Python packages. But the ideal thing is to add this path of pip to your $PATH variable to run pip from anywhere by running:PATH=$PATH:~/.local/bin
.bashrc:source ~/.bashrc
Now, you can install Python packages using pip using pip install <package_name> and they will be installed in the ~/.local/ directory and will only be available to the current user.