Getting Python 3 to run on macOS Monterey

This article is absolutely a bit more niche than what I usually write about, so sorry in advance for that.
Python 2 was deprecated a while ago, but continued to be the default on macOS for a while. After upgrading my MacBook to Monterey, I discovered that Python 2 had been removed.
I don’t code in Python, but it is my preferred way to run a web server on my Mac.


This content originally appeared on Go Make Things and was authored by Go Make Things

This article is absolutely a bit more niche than what I usually write about, so sorry in advance for that.

Python 2 was deprecated a while ago, but continued to be the default on macOS for a while. After upgrading my MacBook to Monterey, I discovered that Python 2 had been removed.

I don’t code in Python, but it is my preferred way to run a web server on my Mac.

I installed Python 3, but running python in terminal was throwing a command not found error in Terminal.

After a bunch of Duck Duck Going, I finally found a solution on StackOverflow. I run this command in Terminal.

echo "alias python=/usr/bin/python3" >> ~/.zshrc

As I mentioned a few weeks ago I use Oh My Zsh in terminal. If you use stock terminal, the file you write to (.zshrc in the code above) might be different for you.

But this fixed my issue, remapping the python alias to python3 instead of python2.

⏰🦉 Early Bird Sale! Today through Monday, get 40% off registration in the next session of the Vanilla JS Academy.


This content originally appeared on Go Make Things and was authored by Go Make Things


Print Share Comment Cite Upload Translate Updates
APA

Go Make Things | Sciencx (2022-06-30T14:30:00+00:00) Getting Python 3 to run on macOS Monterey. Retrieved from https://www.scien.cx/2022/06/30/getting-python-3-to-run-on-macos-monterey/

MLA
" » Getting Python 3 to run on macOS Monterey." Go Make Things | Sciencx - Thursday June 30, 2022, https://www.scien.cx/2022/06/30/getting-python-3-to-run-on-macos-monterey/
HARVARD
Go Make Things | Sciencx Thursday June 30, 2022 » Getting Python 3 to run on macOS Monterey., viewed ,<https://www.scien.cx/2022/06/30/getting-python-3-to-run-on-macos-monterey/>
VANCOUVER
Go Make Things | Sciencx - » Getting Python 3 to run on macOS Monterey. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/06/30/getting-python-3-to-run-on-macos-monterey/
CHICAGO
" » Getting Python 3 to run on macOS Monterey." Go Make Things | Sciencx - Accessed . https://www.scien.cx/2022/06/30/getting-python-3-to-run-on-macos-monterey/
IEEE
" » Getting Python 3 to run on macOS Monterey." Go Make Things | Sciencx [Online]. Available: https://www.scien.cx/2022/06/30/getting-python-3-to-run-on-macos-monterey/. [Accessed: ]
rf:citation
» Getting Python 3 to run on macOS Monterey | Go Make Things | Sciencx | https://www.scien.cx/2022/06/30/getting-python-3-to-run-on-macos-monterey/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.