brew uninstall --ignore-dependencies python@3
cd /usr/local/Cellar/python/
rm -rf /usr/local/bin/python3
cd /Library/Frameworks/Python.framework/Versions
rm -rf /Library/Frameworks/Python.framework/Versions
cd /usr/bin
rm -rf python3*
brew rm python
$ rm -rf /usr/local/opt/python
$ brew cleanup
// https://docs.python-guide.org/starting/install3/osx/
export PATH="/usr/local/opt/python/libexec/bin:$PATH"
brew install python
// restart Terminal
// uninstall pip3
sudo pip uninstall pip3
sudo pip uninstall pip
rm -rf /Library/Developer/CommandLineTools/usr/bin/pip3
// install pip and pip3
pip3 install --upgrade pip3 setuptools
python3 -m venv env
source ./env/bin/activate
brew cleanup
cd /usr/local/lib/python3.8
sudo chown -R $(whoami) $(brew --prefix)/*
brew postinstall python
python3 get-pip.py
// Done
Last active
July 9, 2020 07:27
-
-
Save zoonderkins/edca53d48d070ebe6f988b8e4183b2ee to your computer and use it in GitHub Desktop.
Fix python3 on mac with multiple version
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment