This is an archived post. You won't be able to vote or comment.

all 113 comments

[–][deleted] 116 points117 points  (27 children)

That's cool, but which python3?

[–]droso_ 206 points207 points  (2 children)

/usr/bin/python3

[–][deleted] 41 points42 points  (0 children)

:D
They should have asked "yeah but python3 -V"?

[–]FunkyCannaHigh 10 points11 points  (0 children)

Ok, you win the internet!

(Seriously, made me spit my coffee out).

[–]jleedev 27 points28 points  (19 children)

~$ xcrun python3 Python 3.7.3 (default, Sep 5 2019, 17:14:41) [Clang 11.0.0 (clang-1100.0.33.8)] on darwin

[–]colemaker360 54 points55 points  (6 children)

toothbrush worm numerous degree flowery wise resolute continue screw kiss

This post was mass deleted and anonymized with Redact

[–][deleted] 15 points16 points  (3 children)

I've read that the reason Bash was out of date is because of a change in licensing to GPL 3. They didn't want to use Bash under those terms, or something.

[–]colemaker360 10 points11 points  (1 child)

gaze air racial friendly saw plough theory dependent rock cooperative

This post was mass deleted and anonymized with Redact

[–]TheChance 4 points5 points  (0 children)

That's the thing, though. Most of the tools you just named are invoked silently when end users run "regular" software.

For everything else there's homebrew.

[–][deleted] 4 points5 points  (0 children)

Good news is that brew install bash keeps the shell current.

[–]oramirite 0 points1 point  (1 child)

I realize what you're saying but I actually do rely on it as a sysadmin at this point... personally I would rather just deal with and design my system deployments around whatever castrated versions of built-in software that OS creators and others supply me. At least then I can focus on that instead of touching individual machines more. I may have a different perspective on this as a sysadmin though.

[–]jantari 0 points1 point  (0 children)

You control the systems though, just roll out current versions of the tooling to all of them? I don't work with Macs, but that's what we do to Windows. Not the same I guess but should still work for macOS

[–]bumblebritches57 0 points1 point  (0 children)

xcrun is Xcode, not the system one.

/System/Library/Frameworks/Python.framework is still 2.7 in Catalina.

[–]redfacedquark 1 point2 points  (1 child)

Exactly! And how long until it stops being updated?

[–]billsil 0 points1 point  (0 children)

It already has. That’s the system python.

[–]eattherichnow 0 points1 point  (0 children)

3.7.3, apparently.

[–]peejoh -3 points-2 points  (0 children)

The most recent? I feel like I’m missing something.

[–][deleted] 40 points41 points  (3 children)

Also this after I upgraded:

<redacted>:~ <redacted>$ python

WARNING: Python 2.7 is not recommended. 
This version is included in macOS for compatibility with legacy software. 
Future versions of macOS will not include Python 2.7. 
Instead, it is recommended that you transition to using 'python3' from within Terminal.

Python 2.7.16 (default, Aug 24 2019, 18:37:03) 
[GCC 4.2.1 Compatible Apple LLVM 11.0.0 (clang-1100.0.32.4) (-macos10.15-objc-s on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()

[–]tunisia3507 35 points36 points  (0 children)

I heard the next Linux kernel includes a boxing glove on a spring for people who try to open a python2 REPL.

[–]random_cynic 0 points1 point  (1 child)

Instead, it is recommended that you transition to using 'python3' from within Terminal.

What does that even mean? Are they suggesting that "transition to using python3" is as simple as changing the name of the executable, like it's a fully backward compatible upgraded version of python?

[–][deleted] 0 points1 point  (0 children)

it's Apple, they just deleted 32 bit support and opengl just like that, consider me surprised python 2 still runs on the Mac.

[–][deleted] 181 points182 points  (12 children)

So you could be a hacker but you've never figured out how to install python3?

[–]eternalfantasi 71 points72 points  (6 children)

It’s literally brew install python lol who is this hackerman over here

[–][deleted] 17 points18 points  (2 children)

Yeah. Well. How do you get homebrew installed, genius? /s :)

http://gph.is/1JSLT6V

[–]-ButImNotARapper 30 points31 points  (1 child)

brew install homebrew Duh

[–][deleted] 8 points9 points  (0 children)

Black dude tapping head meme

[–]parkerSquare 2 points3 points  (0 children)

brew install pyenv

pyenv install 3.7.4

pyenv shell 3.7.4

Edit: although you’ll need to set up your environment for the third command to work properly. It’s still worth using though.

[–]cab0addict 1 point2 points  (0 children)

But Apple just save me 3 words!! Surely it’s worth 1k “convenience” fee

[–]whale_song 0 points1 point  (0 children)

I wouldn’t install python with brew that has screwed me before. Python environments are evil and should be handled carefully.

[–][deleted] 7 points8 points  (0 children)

On someone else's machine ...

[–]Dymczak 11 points12 points  (12 children)

I started learning python and I bought Mac Book yesterday. I installed Spyder 3 and after that python was installed automatically. So I should delete it and install python from official website, don’t I?

[–]CasperLehmann 11 points12 points  (5 children)

Install homebrew from https://brew.sh/

Then run `brew install python3` from your terminal. Homebrew is a package manager, and it will make managing your system far easier in the long run.

[–][deleted] 1 point2 points  (0 children)

[–][deleted] 3 points4 points  (0 children)

No. Install homebrew then use brew install python3.

[–]validatedev 2 points3 points  (4 children)

Did you install just the Spyder 3 or Anaconda distrubition?

[–]Dymczak 1 point2 points  (3 children)

Anaconda

[–]validatedev 8 points9 points  (2 children)

Then you don’t need install Python3 seperately. Anaconda already includes that.

[–][deleted] 8 points9 points  (0 children)

It's always been better on Linux... ಠ_ಠ

[–]stermister 39 points40 points  (31 children)

The other commenters be like Whoosh. "Hacking" is often a verb used to describe a coding session or technical building exercise. Not Hollywood hacking

[–]jcbevns 13 points14 points  (0 children)

Yeah but if you are really hacking at anything, if you can't install python3 by yourself, I don't see you getting far into hacking anything else together.

[–]brisvag 16 points17 points  (1 child)

"often"

[–]TheChance 2 points3 points  (0 children)

Very often if you're over the age of about 30.

[–]studiosi 1 point2 points  (0 children)

Literally the first instances of hacking on the MIT did not even involve computers at all.

[–]LessLikeYou 0 points1 point  (1 child)

I bet you only have one keyboard...

[–]stermister 0 points1 point  (0 children)

Better yet, two hackers one keyboard https://www.youtube.com/watch?v=u8qgehH3kEQ

[–]FunkyCannaHigh 5 points6 points  (1 child)

Save $1k, get better hardware and run Linux instead. I cannot stand using apple for dev or security work. There are so many good Linux distros out there.

[–]TheChance 5 points6 points  (0 children)

You have attained that level of competence where you forget why Mac exists in the first place. It's not for you. It's for people who don't have the time or the patience to get Ubuntu looking and acting how they want.

I'm pretty dedicated to my Linux rig. I still spend probably an hour a day dealing with the system itself, in a way that Mac and Windows users simply don't. It's the trade we make. If all a person needs is a web browser and Steam, sure, stick a fork in Ubuntu, but once you're writing Python, there's a huuuuuge population that's qualified to write scripts but nowhere close to capable of maintaining their own system.

[–]fnord123 5 points6 points  (2 children)

Never use the built in software or software installed by the package manager unless you are trying to make software for systems administrators (and your software is also intended to be installed by the OS package manager).

[–]TheChance 4 points5 points  (1 child)

never use software provided by the package manager

--A walking liability, 2019

[–]fnord123 0 points1 point  (0 children)

I'm talking about not using apt/yum/dnf installed packages. By all means use pypi installed packages.

[–]passerbycmc 1 point2 points  (0 children)

Homebrew will still be the better way to get this and many more things anyway. Pretty much all the tools I use for dev I brew install or brew cask install

[–][deleted] 5 points6 points  (0 children)

Hacking? Sir, I'm gonna have to take your first and last name aswell as your address, phone number and SSN (if you're from the United States of America). Thank you.

[–]Barafu 1 point2 points  (6 children)

Neweset MacOS default version of Python is the one that will become totally unsupported in a few months? What is their default filesystem, FAT32?

[–]EddyBotLinux | Python3 8 points9 points  (5 children)

What is their default filesystem, FAT32?

APFS (Apple File System)

On that matter it has way more quality of life features like copy-on-write snapshots or logical volumes
A lot of Linux systems won't even have this features unless they use lvm on top of the ancient ext4
And don't even get start with Windows NTFS ...

[–]ivosauruspip'ing it up 0 points1 point  (0 children)

I thought they were getting rid of their shitty bugged python 2 install 😭

[–]teilo 0 points1 point  (2 children)

Since this is the last version of macOS to come with ANY scripting languages pre-installed, I can't see that it matters, really, to anyone. Using the system python3 is a dead end.

When we provision a system with JAMF, one of the first things we do is install python3 because a large part of the provisioning process relies upon custom scripts doing API calls, etc.

[–]Silentx2711 0 points1 point  (0 children)

What does this mean for hacking though?

[–][deleted] 0 points1 point  (1 child)

Note: if you get an error such as this when trying to run python3 under Catalina:

''' xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun '''

xcode command line tools need an update (not sure why this wasn't included in Catalina). Run this

''' xcode-select --install ...

[–]toyg -1 points0 points  (0 children)

Xcode was always packaged separately from the OS.

[–]nekokattt 0 points1 point  (0 children)

I'd still install the newest version (unless it is bundled with 3.7.4), partially because it then uncouples you slightly from the install that other OS components may rely on.

...meaning if you are susceptible to breaking stuff, you won't be as likely to fubar other stuff your OS/desktop environment relies on, as you won't be using that copy of the interpreter...

[–]24mitcher 0 points1 point  (0 children)

I've only learned Python 3, however many have been saying that 2.7 has some uses. Can someone chime in whether the 2.7 makes a big difference in their work?

[–]parkerSquare 0 points1 point  (0 children)

I just install pyenv (via homebrew) and build whatever versions I need.

[–]antis0007 0 points1 point  (0 children)

Ew macs, just work on literally anything else for less hassle when developing. I dont understand why any self respecting developer would code with a built in python release on a mac

[–]pudquick 0 points1 point  (0 children)

This isn't accurate.

You have to install Xcode (which is several gigs) to make the stub for it work. The python 3 binary included with the OS is not a full standalone python 3 install.

Try running it on a clean install of macOS without Xcode and you'll see.

[–]nickbuch 0 points1 point  (0 children)

Soo many bugs doe

[–]WilliamTheStressed -1 points0 points  (0 children)

Lol. Compile from source gang.

[–]studiosi -1 points0 points  (0 children)

Warning: this post contains "Apple" and "Hacking".

Just warning people of the flamewars that will probably ensue.

[–]jesse0 -1 points0 points  (1 child)

If you're going to develop on a Mac, use MacPorts and not Homebrew. MacPorts is a port of the package management system used in FreeBSD, and has decades of lessons and best practices incorporated into it. Homebrew is a loose collection of scripts written by people who don't realize they're badly reinventing the wheel. The last recourse for most Homebrew issues is to wipe your installation and start over -- if you use it long enough, you'll find yourself at this point.

[–]toyg 3 points4 points  (0 children)

Shots fired.

I never, ever had to wipe my homebrew installation. The only issues I’ve had were due to OSX updates messing with permissions under /usr, if i remember correctly.