I tried to install pip in python $ python get-pip.py
through terminal but had this warning in Terminal.
Python3.8
MacOS Catalina
Please help :( . I have been trying to search for answers for days
WARNING: The scripts pip, pip3 and pip3.8 are installed in '/Library/Frameworks/Python.framework/Versions/3.8/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
One of the most common problems with running Python tools like pip is the “not on PATH” error. This means that Python cannot find the tool you're trying to run in your current directory. In most cases, you'll need to navigate to the directory in which the tool is installed before you can run the command to launch it.
Single Python in system x : sudo python -m pip install [package] If the package is for python 3. x : sudo python3 -m pip install [package]
The error “'pip' is not recognized as an internal or external command” is encountered because of two main reasons that are. PIP Installation path is not added to the system variables: If you have installed python through prompt then you need to configure PIP path manually.
You are getting this error because of the absence of the location that pip is installed from your PATH.
You need add:
export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/3.8/bin"
to the end of your .bash_profile
, like @hoefling commented.
As of March 2022, under macOS Monterey 12.2.1, I had to use a different PATH change to reach pip
:
export PATH="$PATH:/Users/<username>/Library/Python/3.8/bin"
Notes:
/Library/
but rather at ~/Library/
, possibly because it arrived via brew
- or that Monterey uses a different location.~/
- so one rather has to use /Users/<username>/...
in at least this case./usr/bin
etc.) to take precedence. On the other hand, installing e.g. python to those main paths will also take precedence over any python setup that depends on the updated path and could therefore damage it. Choose your poison.If you are on a Raspberry Pi (Raspbian OS) then do the following:
nano /home/pi/.profile
At the end of the file add:
# set PATH to pip
PATH="$HOME/pi/.local/bin:$PATH"
Ctrl+X, Y, Enter <-- to save changes on the .profile file
Then reboot your Raspberry Pi to apply changes.
You can check now with pip --version
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With