realpython / python-guide

Python best practices guidebook, written for humans.
https://docs.python-guide.org
Other
28.35k stars 5.83k forks source link

macOS now comes with python3, not python2. Mac article needs complete rewrite. #1032

Closed sandrogisler closed 4 years ago

sandrogisler commented 4 years ago

Page "https://docs.python-guide.org/starting/install3/osx/" is largely obsolete since newer versions of macOS now come with python3 built-in.

glyph commented 4 years ago

This is not true. macOS has a shim in /usr/bin, but the actual python3 install is in the Xcode app bundle:

$ /usr/bin/python3
>>> import sys
>>> sys.executable
'/Applications/Xcode.app/Contents/Developer/usr/bin/python3'

Testing this conclusively requires a fresh OS install, but I believe this requires the full Xcode app and isn’t present in the command line tools download.

sandrogisler commented 4 years ago

I apologize. I have to admit that glyph is very likely correct. I do have xcode on my machine, and it is absolutely possible that python3 came with xcode, not with the OS. I was just surprised (and excited) that python3 worked without any further ado in terminal. I assumed falsely that it came with the OS and didn't think that it could've come with a package that I installed later. I will attempt to close the issue.