FAQs: Python Setup on macOS 11.3
-
Preferred way of installing Python?
Homebrew,$brew install python.
Alternatively, MacPython. -
What Python executables am I using now?
$which python$which python3
-
How to default to Homebrew-installed Python?
Addexport PATH="/usr/local/opt/python/libexec/bin:$PATH"to~/.bashrcor~/.zshrc. -
How to uninstall MacPython properly?
Follow the instructions on this page. Simply put, remove thePythonfolder in theApplicationfolder, files in/Library/Frameworks/Python.framework, and Python symlinks in/usr/local/bin/.MacPython automatically adds PATH instructions to
~/.zprofile. Remove those if you see unwanted results with$echo $PATH(e.g.,/Library/Frameworks/Python.framework/Versions/3.9/bin). -
Do I get Tkinter with Homebrew-installed Python?
Yes. Try$brew install python-tk. -
Do I need to port
python/piptopython3/pip3in my shell profiles?
Not necessary if you have the right setup with Homebrew. -
How do I build Python files in Sublime Text?
Change"shell_cmd": "python -u \"$file\""to"shell_cmd": "python3 -u \"$file\""inPython.sublime-build.