How do fix pip command not found?

PIP stands for (preferred installer program). Pip is used to download packages or applications written in python from a third party, which you can use in your python block of code. If you attempt to …

PIP Command Not Found

PIP stands for (preferred installer program).

Pip is used to download packages or applications written in python from a third party, which you can use in your python block of code.

If you attempt to download packages for the python block of code without downloading and installing the package manager or python module, this will raise an error called “pip command not found.”

“PIP Command Not Found” is an error that occurs in python when the user wants to run the PIP command and it does not exist.

If it exists, then the path is not set correctly.

You can check the path of the pip command by using:

echo $path

After reviewing the path, you can add your required directories.

In this article, we will discuss:

  • Pip command not found in windows.
  • Pip command not found in Linux.

Pip command not found in windows.

PIP is installed by default in the latest python versions, but in older versions, we have to add PIP manually. If you have checked in your system by running pip help command on command prompt:

pip help

And found something like that:

PIP Command Not Found

‘pip’ is not recognized as an internal and external command, operable program, or batch file.

Then, in that case, we will download the “pip” on the windows operating system.

Download pip

Before downloading the PIP first, download the get-pip.py

Once it is downloaded, then configure its folder.

Install get-pip.py

Then open a command prompt and run the command folder get-pip.py

Let say it is in the python folder, then you will write.

python get-pip.py

Or you cannot find its location in the directory, then run the dir command on the command prompt to know all the directories of your system.

dir

Verify Installation

Then verify the installation by checking the pip help command that if it exists or not:

pip help

Check pip version

Then, check the pip version by using the pip –version command :

pip --version

Add pip in the windows environment variable.

To access or run pip from any path/location, you need to add it to the windows environment variable.

to do this, follow the steps below:

  1. Go to the Control panel from the windows search menu
  2. Then, in the control panel, open system and security
  3. Then, click the system settings 
  4. In system settings, select Advanced system settings.
  5. Then, open environment variables and double-click on path variables in the system variables.
  6. Then, click new and add directories where you have installed pip
  7. Select ok, to save changes.

Pip Configuration

On windows pip configuration file is stored %HOME\pip\pip.ini.

On windows, Pip also contains a legacy called legacy per-user configuration file.

This file is stored at %APPDATA%\pip\pip.ini.

If you want to store the pip config file on a custom path location, then you can set it by using the environment variable PIP_CONFIG_FILE.

Upgrading pip version

Like every other software, pip can also be upgraded since its versions occasionally come, but new versions contain extra features and better functionality; you can use the given command to upgrade your pip.

python -m pip install --upgrade pip

Downgrading pip version

When you have upgraded pip, and it is not performing according to your wish and need, you can also downgrade it by using the command given below.

python -m pip install pip==version_number

Pip command not found in Linux.

On Linux operating system, the python package manager or python module is an independent package means you have to download and install pip manually or separately.

To install pip on Linux, follow the command given below:

For python2, use this command to install pip.

For python3, use this command to install pip.

Sudo apt install python3-pip

Or you can also use the below command to install pip :

Sudo easy_install pip

Then the user can set a password according to the wish.

Check pip version on Linux.

To check the version of pip on Linux, writes the command given below:

Pip -V

Upgrade pip on Linux

To upgrade pip on Linux operating system, use the command given below:

Pip install -U pip

Conclusion:

Pip command not found” is an error that occurs when the user runs the pip command and pip does not exist, or its path has not been set correctly.

This error is raised on every operating system when there is an issue in pip.

We have discussed above how you can rectify this error on Windows and Linux operating systems.

Suggested Read: How to Change the Language on Twitter

Leave a Comment