Today, I tried installing Python (3) with the brew package manager. I did it using the normal procedure: running the command brew install python
. Installing seemed to go well; I don't get any errors. It finishes with this message:
Python has been installed as /opt/homebrew/bin/python3
Unversioned symlinks
python
,python-config
,pip
etc. pointing topython3
,python3-config
,pip3
etc., respectively, have been installed into /opt/homebrew/opt/python@3.10/libexec/bin
However; when I run: pip3 show pip
or pip show pip
I get this result:
Name: pip Version: 22.2.2 Summary: The PyPA recommended tool for installing Python packages. Home-page: https://pip.pypa.io/ Author: The pip developers Author-email: distutils-sig@python.org License: MIT Location: /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages
That location is clearly wrong. So I tried the brew doctor
command to see if anything is wrong. It returns me:
Your system is ready to brew.
I searched Stackoveflow for issues related to symbolic links and I noticed you can re-apply symbolic links by running: brew unlink python@3.10 && brew link python@3.10
. It returns:
Unlinking /opt/homebrew/Cellar/python@3.10/3.10.6_1... 25 symlinks removed. Linking /opt/homebrew/Cellar/python@3.10/3.10.6_1... 25 symlinks created.
Yet running pip3 show pip
or pip show pip
still yields the same, wrong, result as before. Maybe any of you has had a similar situation before and is willing to explain to me a possible cause and or solution for this problem.