No Module Named Pip
This article will discuss resolving a standard error you may face when using the pip package.
Python ‘no module named pip’
This error occurs when you attempt to import a module named ‘pip’ and Python cannot find it in that environment.
Traceback (most recent call last):
Fix 1 – Install the Requirements
You need to ensure a Python interpreter and pip are installed before diving into other techniques to resolve this error.
On Windows, you can download and install Python and pip using the official Python installer.
On Linux (Debian based), open the terminal and run the commands:
$ sudo apt-get update
$ sudo apt-get install python3 python3-pip -y
The commands above should install Python 3 and pip.
On REHL systems, run the commands:
$ yum install python3 python3-pip
$ dnf install python3 python3-pip
You can verify that Python and pip are installed by running the commands:
The commands above should return the installed Python and Pip version.
Fix 2 – Install Pip Package
The second and most viable solution is to install the pip package. Open your terminal and run the command:
On Linux, you may need to replace pip with pip3.
Once completed, the command should install the pip library on your environment.
Note that this method is prevalent when working with minimalistic Python virtual environments.
Fix 3 – Update Path
In some instances, the error may result from an incorrect path entry. You can resolve this by adding the path to your Python executable to your environment variables.
On Windows, open your terminal window and run the command:
The above command should return the PATH where your Python binary is installed. An example output is as shown:

To add the directory to the PATH, run the command:
You can replace the path to your Python binary as given from the output of the where command:
An example is as shown:

The command above should add the specified directory to the env variables.
On Linux, you can add Python to your env variables by running the command:
Closing
This tutorial provides you with three main concepts you can resolve the ‘no module named pip’ error in Python.
About the author

John Otieno
My name is John and am a fellow geek like you. I am passionate about all things computers from Hardware, Operating systems to Programming. My dream is to share my knowledge with the world and help out fellow geeks. Follow my content by subscribing to LinuxHint mailing list
Solved: «/usr/bin/python3: No module named pip» error on Linux
In this article, we will look into how to solve «/usr/bin/python3: No module named pip» error which I believe is a pretty common error in a freshly built Linux System where python3 packages are not installed yet. pip is a very famous python package management tool frequently used by Python Programmers and developers to manage their application packages. If you don’t have pip installed before you are trying to install any of the python modules then you will always end up with «/usr/bin/python3: No module named pip» error just like what I encountered last night. While this may not be the only reason to have this error but this is the common most reason for lot of folks !!

Solved: /usr/bin/python3: No module named pip error on Linux
So when I was trying to install a package using pip, I encountered below error in my Ubuntu 20.04 LTS System. You might be getting the same error in different Linux version.
While this error can come due to multiple reasons but in most of the cases you will see this error because of pip package not installed in your System. So to solve this kind of error, you need to simply install pip package from the default Repo. For example, in my case I have used apt-get install python3-pip command to install this package in my System. More about PIP.
If you are using RHEL/CentOS 7 based Systems, then all you need to do in to enable the EPEL Repo and then install the package by using yum install python3-pip command. For RHEL/CentOS 8 based Systems, you can use dnf install python3-pip command.
After successful installation, you can verify the package version by using pip —version command as shown below.
After installing the package I again tried to run the earlier command then this time I noticed that the command worked successfully and now it is not throwing «/usr/bin/python3: No module named pip» error as shown below. Hope this helps !!
How to solve ImportError: No module named pip in Python
In this tutorial, we'll see how to solve a popular Python error on Linux Mint and Ubuntu:
ImportError: No module named pip
The error is raised when you try to install new package or running command like:
In the next sections we will see how to solve the error
2. Solve ImportError: No module named pip on Ubuntu
To install pip module on Linux Mint or Ubuntu we can use apt-get and install it as follows:
Now after running:
you should get something like:
3. Install pip with ensurepip module
Alternatively we can install pip from Python itself by running. Most python versions are shipped with module ensurepip which can be used for installation:
The command above will work for Linux distros. If you like to learn more you can check: pip documentation v22.0.3.
4. Manual Installation of pip module
Finally if you prefer to manually download and install pip you can follow next steps:
- Download the script, from https://bootstrap.pypa.io/get-pip.py
- Open Terminal
- move to the folder containing the get-pip.py file
- Run python get-pip.py
This method is perfect if you need to install pip offline.
5. Conclusion
To conclude, this article shows how to solve the "ImportError: No module named pip" error in several different ways.
All solutions are tested on Linux Mint and Ubuntu. Some of them might work on Windows or Mac with small changes. For further reference please check the official documentation: pip installation on Linux, MacOS and Windows.
By using SoftHints — Python, Linux, Pandas , you agree to our Cookie Policy.
ModuleNotFoundError: No module named ‘pip’ #5710
Description
My system admin installed Python 3.6 for me in my AWS workspace and i requested him to update the pip version to 18 but while he was trying to upgrade the version, he ran into error. All below-mentioned commands were executed from a Powershell window in Administrative mode:
Output
Are we doing something wrong here? I also checked few links that suggested using easy_install. I tried that as well but ran into issues.