PythonLogo

Advertisement

Despite the fact that Python is still a popular programming language, Apple has decided not to include it with MacOS.

Thank you for reading this post, don't forget to subscribe!

If you’re one that frequently uses it, then you may want to know how to make it the default in MacOS.

Here’s how:

  1. Open Terminal (Finder > Utilities).
  2. To make this easy, we’re gonna use nano for the editor.  Go ahead and open it, like this: nano ~/.zshrc
  3.  Add the following to the bottom of the file: alias python=/usr/local/bin/python3
  4. Hit [Control+O] and then [Control+X] to save the edit and then exit out of nano.
  5. Now you need to verify that the changes have been made.
  6. At the prompt, type: python –version
  7. Remember this is only an alias.
  8. If you continue to have the original Python 2.7.x release installed on the Mac, it remains accessible and usable by specifying the full path, like so: /usr/bin/python
  9. That’s it.

For those who don’t know, Apple has been wanting to get rid of Python for a while, and the company has taken this time to do so, as described below:

Deprecations
Python 2.7 was removed from macOS in this update. Developers should use Python 3 or an alternative language instead. (39795874)

About Post Author

(Visited 128 times, 1 visits today)


Advertisement


Discover more from CompuScoop.com

Subscribe to get the latest posts sent to your email.

Catch up on what you’ve missed:

Verified by MonsterInsights