Pip3 Gone After Hombrew Upgrade
Solution 1:
You need to decide how you want it to work and homebrew can then accommodate you. The information is available if you run:
brew info python
Python has been installed as /usr/local/bin/python3
Unversioned symlinks
python,python-config,pipetc. pointing topython3,python3-config,pip3etc., respectively, have been installed into /usr/local/opt/python/libexec/binIf you need Homebrew's Python 2.7 run brew install python@2
Pip, setuptools, and wheel have been installed. To update them run
pip3 install --upgrade pip setuptools wheelYou can install Python packages with pip3 install They will install into the site-package directory
/usr/local/lib/python3.6/site-packages
So:
if you want to use versioned commands, i.e
python3,pip3andidle3, put/usr/local/opt/python/binat the start of your PATH:export PATH=/usr/local/opt/python/bin:$PATHif you want to use un-versioned commands to mean Python3 and its tools, i.e.
python,pipandidle, put/usr/local/opt/python/libexec/binat the start of your PATH:export PATH=/usr/local/opt/python/libexec/bin:$PATHif you want to use the (ancient) Python v2.7 supplied by Apple as part of macOS, put
/usr/binat the start of your PATH, and use the commandpython:export PATH=/usr/bin:$PATH
Solution 2:
They changed the default commands in the Homebrew package for Python 3 to be python3 and pip3 to be compliant with PEP 394.
If pip3 doesn't work I'd try reinstalling Python: brew reinstall python.
brew install python installs Python 3 (and pip) since Homebrew 1.6.0.
The error in the output for brew reinstall python that you posted says that /usr/local/lib/python3.6/site-packages/pkg_resources/__init.py__ cannot be deleted because of lacking permissions.
Have you checked the permissions of that file and verified that you have write permissions on it?
If not, you can add write permissions with
chmod u+w /usr/local/lib/python3.6/site-packages/pkg_resources/__init.py
and then try again.
Post a Comment for "Pip3 Gone After Hombrew Upgrade"