Hacker News new | past | comments | ask | show | jobs | submit login

Does MacOS ship Python 3 by default? I've been using homebrew for so long that I forgot.



M1 MacOS 12.2, never installed any dev tools / homebrew

python --version

Python 2.7.18

python3 --version

xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.


It did as python3, but the default python was still 2.7, though it's had a deprecation warning for a bit.


It's possible there was a script lurking somewhere under /System/Library/CoreServices that might have needed Python 2. The script got rewritten/snipped off, and there you go.


Up until 12.3, it did.

Now, it's included in the CLI tools. You know how when you run 'clang' or any of those, it's a wrapper that offers to download the real tool for you? That's how the 'python3' binary works now.


Is there any chance that they’ve stopped confusing everyone by aliasing gcc to clang transparently? That’s the change I really want to see. The programs inherently accept different arguments. The amount of GitHub issues that boil down to someone thinking they’re calling GCC but calling Clang instead is staggering. Let my build fail.


macOS has never shipped with python3 by default; it's only ever been a shim like that.


% python3 --version

Python 3.8.9

macOS 12.2 (Intel), Xcode 13.2.1, no homebrew, no macports


It’s bundled with Xcode.


They decided to not ship anything and let you download it yourself.


This is true, but it's also worthwhile noting that python3 is included with Xcode (or the Xcode Command Line Tools).


Which you need anyway for brew/port, so most people that need a python in the command line will get it installed without noticing.


and I like it this way


What's homebrew? I've been using macports so long, I've never heard of it.


It's the other big package manager for Mac OS (and Linux) other than Macports.


Thanks, but I was trolling the shameless, senseless and topically irrelevant plug for homebrew. Get homebrew! Don't miss out! Everyone's doing it! All the hip youngsters know!

Come on. ><




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: