how to update pip

I installed a python linter (pylint) in Visual Studio Code and got the following message:


You are using pip version 19.0.3, however version 19.2.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.


However, typing the above generates the following error:


zsh: command not found: pip


Using the which command, I noticed that there's a pip3 but there doesn't seem to be any pip!


I'm confused!

iMac Line (2012 and Later)

Posted on Oct 10, 2019 5:37 AM

Reply
4 replies

Oct 10, 2019 6:28 AM in response to numbles45

Apple did not include the third-party pip tool in the now deprecated Python v2.7.10. If you have pip3 then it will know where the Python3 library is installed and the following will upgrade pip3 (even though it indicates pip:


/usr/local/bin/pip3 install --upgrade pip



The assumption is that you installed some variation of Python3, either by the installer from Python.org, or by using a package manager that provided links from the Python3 framework into /usr/local/bin.


I would recommend against updating anything in the operating system installed Python 2.7.10.


Because the default shell in Catalina is now Zsh, you cannot depend upon prior Bash dot files to set your PATH, and must add that to the ~/.zshrc. The export PATH is the same syntax, and to see anything in /usr/local/bin, you need to explicitly add that to your PATH.

Oct 10, 2019 9:53 AM in response to numbles45

I was not aware that Apple was including Python 3 within the Xcode bundle. You won't be able to update pip3 inside the Xcode application, or in /usr/bin due to Catalina placing the operating system itself in a read-only APFS partition. That updating of pip3 to a newer version is only a suggestion coming from VSC, and not something that you must do.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

how to update pip

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