How Do You Install pip or pip3?

Problem scenario
You think you installed pip (e.g., using this posting for Debian/Ubuntu, using this posting with Linux SUSE, using this posting for a CentOS/RHEL/Fedora server, or this posting as an alternative), but when you run pip, you get "command not found."  How do you install pip and get it working?

Solution
pip or pip3 may actually be installed despite the fact that things may seem otherwise. The path to it (pip or pip3) may not be in your environment (e.g., env) variables.  Run these commands:

sudo find / -name pip
sudo find / -name pip3

Use the full directory path and the pip file when calling the pip command.  For example, use one of the following as a command:

/usr/bin/subdirectory/version/pip
/usr/bin/subdirectory/version/pip3

Leave a comment

Your email address will not be published. Required fields are marked *