You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

how to install pip

Hi, am new to coding. Have installed python on my Mac. And have been getting pop up saying 'There is no PIP installer in the selected environment'. Can someone help with this? Thanks in advance.

MacBook Pro 16″, macOS 10.15

Posted on Sep 6, 2020 8:45 AM

Reply
Question marked as Top-ranking reply

Posted on Sep 6, 2020 9:15 AM

in Terminal:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

and then

python3.8 get-pip.py

(if python3.8 is your Python executable)

2 replies

Sep 6, 2020 2:39 PM in response to Sachrb

Python.org started bundling pip with Python 2.7.9, and in their Python 3 distributions as pip3, including Python 3.8.5. So after an installion of Python 2.7.18 (now deprecated), or Python 3.8.5, you will have a pip and pip3 respectively, installed as links in /usr/local/bin.


As you have Catalina, if you have installed either XCode 11.n or the corresponding command-line tools, then Apple is now installing an emaciated Python 3 in /usr/bin, and no pip is installed with it. This is also an very old version of Python 3. The default Python 2.7.16 installed with Catalina does not have a pip installation either. I avoid installing pip or any modules into Apple's Python installations. Note: Apple has indicated that they will remove Python, Ruby, and Perl scripting languages from a future upgrade of macOS.


Once you have tweaked your PATH to include /usr/local/bin before /usr/bin, you can pretend that Apple's Python distributions do not exist (provided you do not do any PyObjC programming, or intend to install the pyobc module) and can update Python.org's pip or pip3 with the following:


pip install -U pip


or


pip3 install -U pip


The Python.org installation process will prepend the /Library/Frameworks/Python.framework/Versions/3.8/bin location to your PATH environment variable in the ~/.bash_profile dot file only, and does not do this for the any Zsh dot file (~/.zshrc), which must be done manually.

how to install pip

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.