r/apple • • Jun 04 '19

Apple will soon be removing Python, Perl, and Ruby from macOS

From the macOS 10.15 beta release notes, under the "Scripting Language Runtimes" section:

https://developer.apple.com/documentation/macos_release_notes/macos_10_15_beta_release_notes

Apparently Apple is planning to remove all of these scripting language runtimes from macOS in a future release. This is very irritating, as all the software out there that relies on these runtimes can no longer assume they will exist on any user's system and will have to bundle it themselves, or remove their reliance on it.

This decision makes no sense to me. Being able to assume those scripting runtimes exist on any macOS system was one of the things that made it great. It's not like these were burning a hole in people's hard drives either -- they're small in the grand scheme of things. All this does is make developer's lives more difficult and cause there to be tons of redundant runtimes in various app bundles. Who does this benefit? Why is it important?

edit: Seems most people quite like that they're removing Python et al, especially due to it being an outdated version. Fair enough!

538 Upvotes

195 comments sorted by

105

u/ImOutOfThisWorld Jun 04 '19

I don’t know i see this as a good thing, I can’t think of many apps (that are not cli) that use any of those languages, also the versions that Apple ships are usually kind of old, one of the first things i do and many others is install better versions, but having the default versions is usually kind of a pain, as it can cause conflicts

The one thing that has me a little worried is homebrew as we’ll need to install ruby first, Apple should make their own package manager for the mac, but we been asking for years and years and just won’t happen, so 2 step homebrew installation it is (maybe a new installation script for homebrew will solve this?)

28

u/guygizmo Jun 05 '19

Presumably bash scripts will still work, so their installer could start as a bash script that installs ruby and kickstarts the homebrew installation process.

2

u/XAleXOwnZX Aug 05 '19

It comes a really complicated (and ultimately completely avoidable) bootstrap process.

I've made a bunch of convenient new-dev-machine installation scripts that I've made for myself. They install homebrew, Fish shell, my IDEs, text editors, fonts, etc., and pull git packages with my configs for Fish, VSCode, etc.

I was able to implement it all in Python 2.7, relying on it being pre-installed on any machine. Installing brew also relies on ruby being available. But now I need to need to have some even more complicated boot-strapping process, using bash/zsh scripts to install python. Shell scripts are an abomination, and I would rather drag my balls through a mile of glass than have to use them any more than I *absolutely* have to. As far as I'm concerned, there's only one kind acceptable shell scripts: one-liners which start your favourite of {Python, Ruby, Java, Rust, Swift, etc.}

2

u/guygizmo Aug 06 '19

Shell scripts are an abomination, and I would rather drag my balls through a mile of glass than have to use them any more than I absolutely have to.

Eloquently put, and I totally agree. This is one of the big reasons I'm annoyed Apple is removing these runtimes, because now we have to write more shell scripts. Good god that's going to suck.

8

u/ImOutOfThisWorld Jun 05 '19

Ohhhh yes that sounds good, i think homebrew installer is a bash script all ready, so shouldn’t be to hard for them to change it :)

3

u/KMartSheriff Jun 05 '19

Bash will probably be removed eventually (they don't say it specifically, but it's not hard to read between the lines)

2

u/boboguitar Jun 05 '19

Until they remove bash..which is coming.

0

u/[deleted] Jun 05 '19

[deleted]

7

u/metamatic Jun 05 '19

For now. Clearly the intention is to remove bash, which is incredibly out of date on OS X.

3

u/zxrax Jun 05 '19

Woah, really?! Is that in the article (which I didn’t bother to read) or have you seen it elsewhere?

5

u/bumblebritches57 Jun 05 '19 edited Jun 05 '19

usually kind of old

they ship python 2.6 2.7...

it doesn't even support Unicode...

8

u/guygizmo Jun 05 '19

they ship python 2.6...

Do you mean the version of Python 2 that comes with macOS by default? If so that's 2.7.10. (Still out of date of course, but not nearly so disastrously.)

2

u/bumblebritches57 Jun 05 '19

It's been a while since I checked, I don't actually use it.

4

u/MikeyMike01 Jun 05 '19

It is normal to ship Python2 for legacy. Linux does as well.

6

u/[deleted] Jun 04 '19

RVM maybe? It's been a long time since I've used that install method anywhere.

4

u/ImOutOfThisWorld Jun 04 '19

Mmm never used ruby for much more than homebrew, RVM looks good

11

u/[deleted] Jun 05 '19

Calibre is one python GUI app that comes to mind (and ironically the dev is stubbornly sticking to python2).

Do macos apps work like anything like flatpak where apps could bundle whatever dependencies they need?

7

u/zakklol Jun 05 '19

Yeah, you can just stick whatever you need in the app bundle and reference it from your code. That's basically what apple said to do if you need to use ruby/python/perl etc.

3

u/fenrir245 Jun 05 '19

Do macos apps work like anything like flatpak where apps could bundle whatever dependencies they need?

Yep. IINA for example packages libmpv and ffmpeg.

5

u/mmmmdarkmeat Jun 04 '19

It’ll probably be rewritten in bash.

30

u/[deleted] Jun 05 '19

Incidentally, Catalina also switches to zsh for the default shell.

10

u/-allen Jun 05 '19

Wait really? That's fucking awesome, makes it one step easier to installing Prezto

3

u/metamatic Jun 05 '19

...which will also be going away eventually, because it's GPL licensed and the current version is really out of date.

1

u/ImOutOfThisWorld Jun 04 '19

Ufff I don’t know, that doesn’t sound good

9

u/PacketOnWirr Jun 05 '19 edited Jun 05 '19

If they didn’t write it, or they don’t use it, I see no reason for them to keep it as part of MacOS. Perhaps they will include an ad on for the software.

EDIT: I read the note, and it states there may be an additional package to install. They do recommend that software authors to bundle the software with an application.

6

u/guygizmo Jun 05 '19

macOS includes lots of software and libraries Apple didn't write.

1

u/PacketOnWirr Jun 06 '19

Sure, but if they don’t use it, they shouldn’t maintain it as part of their Core OS. It should be an add-on or part of the application that needs it.

0

u/[deleted] Jun 05 '19

This is dumb. It's got nothing to do about them using it, it's got to do about us using it.

0

u/PacketOnWirr Jun 05 '19

Exactly why it should be an add-on or bundled with other software.

576

u/[deleted] Jun 04 '19

Security and reduced OS footprint. If most people never use them why have it preinstalled? And if you do use them the system versions are generally out of date and you end up managing two copies of everything anyway because overwriting the default is a recipe for a bad time.

I mostly just let brew handle things and there's still probably 4 random copies of Python floating around my machine each with their own quirky set of pip packages.

34

u/[deleted] Jun 05 '19

8

u/ducsekbence Jun 06 '19

I'm in this image and I don't like it

6

u/[deleted] Jun 05 '19

0

u/[deleted] Jun 05 '19

[deleted]

1

u/SpergLordMcFappyPant Jun 06 '19

This is the truth.

177

u/-lelephant Jun 05 '19

pip though.

I love Python but holy moly does that language have one of the worst fucking package managers.

75

u/[deleted] Jun 05 '19

Same. you have to create a virtual env just to keep shit clean. And that shit is confusing for people who are trying to learn. Okay its relatively simple but everyone has different methodologies for how you should manage your packages and good fucking luck finding one agreed upon method of doing it. Sometimes I consider reformatting just to undo all the fuckery I did while I was learning to code.

39

u/jugalator Jun 05 '19 edited Jun 05 '19

It's funny how venv is considered an "advanced feature" so Python tutorials over the web never use it. So then when you've installed your favorite IDE and think "I'm gonna learn Python!" it instantly goes off the rails. "Why does this package require root?? OK, let's install everything as root then!! Man, Python is weird!" Yet, somehow, the tutorial never even run across the problem and puzzling enough everything can be installed cleanly with pip without root permissions.

And don't even get me started on the unclear relationship / duality between Python installed vs package manager installed stuff, like pip install flask vs apt install python-flask. Why do these packages even exist in the repository! Where does this or the other go, what about this or the other version that will be installed and non-explicit Python 2 vs Python 3 everywhere and why, omg, just why. I'm sure there's a reason but can't it be reachitectured into something better and singular correct way of doing it (preferrably including venv support in a more standardized way from python itself)?

5

u/mydogspeakslatin Jun 05 '19

Can I ask just as a newbie to Python what the best way is to install pip packages on a Mac? Anywhere I can read up on this more?

12

u/Stubb Jun 05 '19

The virtual environments discussed earlier are good for developers who need to work with different versions of the same package. For most users, installing packages in their home directory by passing the --user option to pip will solve the problem. For example, when installing the jsonpickle package:

pip install --user jsonpickle

See this post on Stack Overflow.

2

u/Jaypalm Jun 06 '19

IMO pyenv is the best way to install python on a Unix system. It allows you to install and maintain multiple python versions/environments, each with a separate pip, so when you use 'pip install requests' it's specific to that version.

5

u/ret80x Jun 05 '19

Part of the reason for python-* and similar packages is because many distros (all of the good ones) forbid external dependencies in packages for security, auditing, reproducible builds, reliability and a host of other reasons. So if they want to package an app that uses python-foo, python-bar and python-baz as dependencies they have to package those before they can package the app.

19

u/mrfoof Jun 05 '19

At some point, it makes sense to do all your development in Docker.

3

u/SpergLordMcFappyPant Jun 06 '19

LOL, I love the docker people. Someone brings up a giant bag of problems, and your solution is to fix everything by hitting that bag of problems with an even bigger bag of problems.

It doesn’t actually help, and now you have two giant bags of problems to deal with.

2

u/alexmace Jun 05 '19

Pity Docker is horrible to use on a Mac

1

u/mrfoof Jun 05 '19

What do you think could be done to improve Docker on the Mac?

0

u/[deleted] Jun 05 '19

[deleted]

0

u/SolaireDeSun Jun 05 '19

With windows new Linux subsystem docker performance will be close to native Linux so that isn’t true much longer

0

u/[deleted] Jun 05 '19

[deleted]

1

u/SolaireDeSun Jun 05 '19

https://www.phoronix.com/scan.php?page=news_item&px=Microsoft-WSL2-Coming no it's coming very soon. Filesystem access will be very very fast in wsl2

2

u/[deleted] Jun 05 '19

This reminds me of when I bought a book to learn js and node. I actually gave up and returned the book in the middle of the chapter on setting up my environment. Web dev env's are too complicated.

1

u/DeafStudiesStudent Nov 06 '19

Web dev env's are too complicated

On my Ubuntu machine, for PHP web-development,

$ sudo apt install firefox chromium-browser lamp-server^ git \
composer php-curl php-mbstring php-xml php-gd

2

u/py3_ Jun 05 '19

I’m still new to Python — just learned about venv. I think it’s a great idea!

4

u/PnAchzn2jukcb3M66tWB Jun 05 '19

pipenv is good too.

0

u/[deleted] Jun 05 '19

[deleted]

6

u/frozenpandaman Jun 05 '19

love leaving shrapnel all over my system

34

u/[deleted] Jun 05 '19

You are using pip version 18.0, however version 18.0 is available.

26

u/[deleted] Jun 05 '19

As an irregular Python user native package permissions burn me every time.

... and then there's easy_install.

15

u/CarnivalOfFear Jun 05 '19

"Run everything as Sudo" 😎

14

u/aeiou372372 Jun 05 '19

Once you understand how python imports work and how to manage an environment, I think pip is pretty straightforward to use. In the grand scheme I think python is pretty far from having one of the worst package managers.

Don’t get me started on package management for the Mac native languages — Objective C, Swift, and (maybe) C++. If you think python is bad, in comparison those languages are a train wreck.

12

u/asstalos Jun 05 '19

python is pretty far from having one of the worst package managers.

Trade-off is that Python's standard library has great breadth and depth and working with other packages isn't too painful.

Contrast to say npm and the massive node_modules folder...

4

u/ZacharyM123 Jun 05 '19

npm is a fantastic package manager, it always works. On the off chance it doesn’t, delete node modules and npm i, everything back to normal

5

u/zxrax Jun 05 '19 edited Jun 05 '19

I keep patiently waiting for a first party package manager for swift, and every WWDC I am disappointed. apparently my wishes came true this year!

7

u/TheCracchen Jun 05 '19

Swift package manager was announced and is supported in Xcode 11 for Swift, C, and C++ code

3

u/zxrax Jun 05 '19

Sweet! That’s exciting.

3

u/huxrules Jun 05 '19

Didn't they just announce one in the state of the platforms?

1

u/schrodingers_cat314 Jun 05 '19

venv solves all of the problems

1

u/metamatic Jun 05 '19

If something involves dealing with Python packages I just give up and look for an alternate option. Life's too short.

0

u/Arve Jun 05 '19

Amen. And I'm saying this with a drive half-full of node_modules folders. That I essentially have to set up a virtual environment through virtualenv or Docker to do anything at all - reliably - in Python on my local machine is a good part of why I pretty much do everytyhing not trivial enough for a shell script in JS these days.

1

u/Jaypalm Jun 06 '19

Pyenv pretty much solves all these problems.

20

u/Doggamnit Jun 05 '19

Same. I would always install a separate version and never used the system version.

With docker people can run those language based apps without having to manage their own installation, manually installing necessary packages, etc...

16

u/frozenpandaman Jun 05 '19

I would always install a separate version and never used the system version.

This is what Homebrew does.

7

u/[deleted] Jun 05 '19

Docker is a terrible solution for something that should just work. On a Mac you instead would have to manage a full Linux VM, figure out how much memory your willing to give up, then remember all the Docker commands for managing container tags and mount points.

It's fine for servers but not desktop.

-4

u/Doggamnit Jun 05 '19

I don’t know about all of that... whether it’s python, ruby, java, etc... running these apps requires some rudimentary knowledge. In contrast, docker isn’t terribly hard to understand and you really don’t need to set memory requirements - the same way you don’t try to set memory requirements when running these apps standalone. The fact that docker offers these controls is a bonus, but it sure isn’t a requirement.

There’s also the option to grab something from dockerhub, or github and issue the docker run command as it’s usually noted on the release page. In those cases, it can be a lot easier to run these apps vs managing local system packages.

Docker is great for desktops as well as servers. The instructions are easier to work through compared to any of the languages mentioned above.

3

u/[deleted] Jun 05 '19

The default last I checked was static fixed size which can be a problem if memory is tight already. I eventually set up remote Docker on my NAS so it could be left running and not have to worry about it. Kitematic was an alright UI but there were some problems with my remote setup.

The real killer is most of the time I go to Python it's for matplotlib and GUI utils which are a pain to forward to XQuartz (I've done this). In every case local disk access is needed and rare occasions USB or OpenCL.

5

u/GasimGasimzada Jun 05 '19

Everything has its place and I don’t think using Docker in dev environment is worth it. In servers it is a beast but for developing, it is very slow and redundant. You need to set up a server, then mount a volume to do anything to files. Not to mention viewing Docker environment from IDEs and stuff. On the other hand, you can install the package and start coding.

2

u/guyfrom7up Jun 05 '19

IMHO this is usually just the viewpoint of someone who hasn’t successfully integrated it into their development flow. Once things are setup to your liking, it makes development, review, testing, and deployment an absolute breeze with minimal hiccups.

0

u/[deleted] Jun 05 '19

[deleted]

6

u/[deleted] Jun 05 '19

There's a mac virt api but iirc the default is virtual box. Docker is built around Linux cgroups (similar to BSD Jails) and you need the kernel interfaces to make that happen. Windows with WSL might be native but WSL2 is going to shuffle things around and ship a real kernel.

0

u/[deleted] Jun 05 '19

[deleted]

1

u/[deleted] Jun 05 '19

Interesting. The GUI might be different or I just haven't checked in a while. HyperKit is still a VM as well. Being based on bhyve is nice though.

9

u/michelecostantino Jun 05 '19

Automator uses python. Are they going to remove Automator?

5

u/frozenpandaman Jun 05 '19

Please, god, no.

8

u/relatedartists Jun 05 '19

Ugh.. I think this is what just happened to me. Ruby isn’t working for me to do a gem install and nothing I’ve tried fixes it. I’m guessing it’s probably because of two or more different version numbers I’m seeing. One from home brew and one default, I’m guessing. I’m no expert so I don’t know. I tried a few things but maybe I need to set some environment variable someplace to point to where it should be looking for a gem install? I don’t know and I’m screwed

2

u/[deleted] Jun 05 '19

brew info ruby for the $PATH

I haven't really used Ruby since ML/Mavericks. Back then the recommended install method for brew/RVM switched around a lot but the rules were always 1) don't mess with system ruby/gemset and 2) don't sudo gems or permissions go funny.

3

u/relatedartists Jun 05 '19

When I do that command I see version 2.6.3

When I do “ruby -v” I see version 2.3.7p456

So I don’t know what to do.

I get an error like this one when I do the gem install:

https://github.com/ffi/ffi/issues/286

I’ve tried what this thread suggests but nothing works. I already had Xcode command line tools installed. And tried the “brew install libffi”. I tried the: “brew tap homebrew/dupes” and I get a message that it’s deprecated and then I notice that thread is from 2013 lol

As a noob, I have no idea what to do. I looked at the log file but have no idea what to make of it.

1

u/[deleted] Jun 05 '19

To use ruby from brew you have to set it first in your $PATH. When you run brew info ruby the line below If you need to have ruby first in your PATH run: will switch the default after restarting your terminal.

0

u/[deleted] Jun 05 '19

[deleted]

4

u/relatedartists Jun 05 '19

I’m not sure which ruby I’m using exactly.

I get an error like this one when I do the gem install:

https://github.com/ffi/ffi/issues/286

I’ve tried what this thread suggests but nothing works. I already had Xcode command line tools installed. And tried the “brew install libffi”. I tried the: “brew tap homebrew/dupes” and I get a message that it’s deprecated and then I notice that thread is from 2013 lol

As a noob, I have no idea what to do. I looked at the log file but don’t know what to make of it.

1

u/[deleted] Jun 05 '19

https://github.com/ffi/ffi/issues/286

I have the fix for you! It involves using rbenv, here's the instructions:Delete RVM if you have installed it already

rvm implode gem uninstall rvm

To start, remove and reinstall xcode:

sudo rm -rf /Library/Developer/CommandLineTools

xcode-select --install

Install rbenv:

brew install rbenv rbenv init Restart your terminal

Install Ruby:

rbenv install 2.4.0

When it fails, cd into the failing folder ( something like cd /var/folders/mf/q9bb4w2539vfjprg0j45b02n8c1mr2/T/ruby-build.20190118101128.44882/ruby-2.4.0/) and run a make install as documented in this thread: https://github.com/rbenv/ruby-build/issues/992

once the make install completes you should be good to go!

1

u/relatedartists Jun 05 '19

Whoa thanks!! Wait a sec though, I’m not really super savvy with this stuff. I just tried doing the command “rvm implode gem uninstall rvm” and it says “rvm: command not found”. Should it be a command?

Also, I don’t ever remember installing rvm nor do I know what it even is.

0

u/[deleted] Jun 05 '19

[deleted]

1

u/relatedartists Jun 05 '19

When I do ”brew info ruby” I see version 2.6.3

When I do “ruby -v” I see version 2.3.7p456

I’m just trying to install a gem. So something like “gem install <gem name>” is all I want to do. I do have to use sudo though.

3

u/Koh_Phi_Phi Jun 05 '19

Sounds like you need to add home brew to your PATH. It should be finding the brew version not the system version. Also use rbenv to switch ruby versions.

3

u/[deleted] Jun 05 '19

Yep I use Brew for almost all package requirements, and if it’s available I used Brew Cask.

2

u/XAleXOwnZX Aug 05 '19

And to install home-brew, you need Ruby ^^

Surely they'll end up bundling it, but still.

2

u/[deleted] Jun 05 '19

If most people never use them why have it preinstalled?

The same exact question I ask myself when they added them in the first place TBH.

2

u/[deleted] Jun 05 '19

I only use virtualenv with python. Best way to contain it.

1

u/aaronsherman Jun 06 '19

Security and reduced OS footprint. If most people never use them why have it preinstalled?

Because they give the OS functionality that third party software relies on. Because HLLs are what most people in the world who do any programming program on and because slinging tools is the foundation of the UNIX platform they built their OS from.

But just one side point: there are no security advantages to getting rid of these languages. Each of them is a vibrant ecosystem of support and updates, so any security issues are patched quickly and if someone can smuggle a script onto your Mac and execute it, then they could have smuggled anything else onto the platform.

if you do use them the system versions are generally out of date

That's not really relevant. The issue is what a developer in those languages can target as a greatest-common denominator for OTHER people's machines. If MacOS, Windows and every Linux out there all have python pre-installed and the highest version between them is, say, 2.7.16, then that's going to be the one that script authors for programs that want to work on all of those will target.

If MacOS doesn't have anything, that's a real problem because now you have to hunt for some other tool that they all share and you're probably stuck with JavaScript or the like.

3

u/[deleted] Jun 06 '19

Because HLLs are what most people in the world who do any programming program

I'm a programmer and I had to google that initialism. The tiobe index goes Java, C, C++, then Python. JRE hasn't been preinstalled either for some time now.

foundation of the UNIX platform

Is POSIX and plain text IO redirection. Most development seems to have forgotten that sadly.

there are no security advantages to getting rid of these languages

ILOVEYOU.txt.vbs

Assuming these languages are impeccably written it's still opsec. There are fewer things on the machine a low effort attacker can count on being there.

That's not really relevant.

This paragraph is fantasy. You either make a nice bundle for your script or there's the song and dance of getting all the dependencies set up and installed. That doesn't go away just because the runtime is there.

It's more common to find scripts and apps written in these languages to be targeting the developers machine. Often a Linux machine relying on non-standard GNU extentions. Sometimes an unmaintained script you have to downgrade to use.

you're probably stuck with JavaScript

I don't think you have a JS cli runtime either. The prevalence of Electron apps now is precisely because they figured out how to bundle the runtime.

0

u/aaronsherman Jun 06 '19

HLL

I'm a programmer and I had to google that initialism.]

It's common among language designers.

The tiobe index goes...

This is not relevant to what I said. To quote their site:

The ratings are based on the number of skilled engineers world-wide, courses and third party vendors.

In other words, it has nothing to do with how often a language is programmed in, but how relevant it is to a career. JavaScript is probably the most commonly used language in the world today, mostly because non-programmers (that is, people employed for something other than programming) vastly outnumber programmers, but non-programmers occasionally write code.

You either make a nice bundle for your script or there's the song and dance of getting all the dependencies set up and installed. That doesn't go away just because the runtime is there.

Sorry, but this is just not the case in most corporate environments. As a dev-ops guy, I'm going to write the thing that works on whatever random crap people have on their desk, with the fewest bootstrap steps required (any one of which might violate corporate standards).

1

u/[deleted] Jun 06 '19

I'm just not used to making that distinction. C was a HLL at one point after all.

TIOBE is flawed as is the SO survey where JS is 65+%. The main point is Java and Python are both up there in terms of code already written and being written. Python is currently in the install and Java is not. I don't think it's a consistent argument from either the user or developer perspective that prevalence be a factor in what comes preinstalled.

If JavaScript is easiest for non-programmers I think Script Editor is where Apple wants you to go for just simple automation tasks. When you start having dependencies is the point where the default install for these languages becomes less attractive.

Last part is true. There could be some rather specific problems deploying in that environment from this.

1

u/aaronsherman Jun 06 '19

C was a HLL at one point after all.

No, it wasn't. The term high level language emerged in the face of the gulf between languages like C/C++ and CommonLisp/Perl where it was clear that something substantially different was going on. Distinguishing features of HLLs are typically:

  • Data types are implemented in software rather than being thin wrappers around hardware types.

  • Variables used within the program are typically not direct mappings to registers

  • Memory allocation is done behind the scenes for the most part

  • Code can be treated as data in the source language (e.g. the ability to eval)

  • Exception handling is done with language-internal abstractions rather than OS or hardware-level implementation.

  • The presence of highly abstracted functional features involving scope such as closures, generators and currying.

Some languages have a few of these (like Java modern, library-enhanced C++) and definitely count as a middle-ground between modern HLLs and more traditional lower level languages. But C was never in this class.

1

u/[deleted] Jun 07 '19

These distinctions are more recent. The goal post moves. If Perl is a HLL then what are the VHLLs now?

2

u/aaronsherman Jun 08 '19

Yeah, I'm going to backtrack and say that I was in an academic subculture that was using terminology that just wasn't mainstream, because what I'm seeing now doing Google Scholar and Books searches back in time doesn't match my recollection. So either I'm getting too old for this shit (possible) or there were just radically different suites of terminology employed in different subdomains (not shocking either)... or some combination :)

-1

u/ifonefox Jun 05 '19

How can you install home brew in the future if there’s no ruby?

3

u/[deleted] Jun 05 '19

By installing ruby.

1

u/ifonefox Jun 05 '19

With what package manager?

2

u/[deleted] Jun 05 '19

You don't need a package manager but MacPorts would work. macOS doesn't come with C, C++, Obj-C, or Swift either. You have to install Xcode.

1

u/ifonefox Jun 05 '19 edited Jun 05 '19

You don't need a package manager but MacPorts would work

You want to install a system-level version of ruby or another package manager to install a package manager? Then you just have the problem you want to get away from: an unmanaged version of ruby.

macOS doesn't come with C, C++, Obj-C

I thought macos comes with clang, which compiles C, C++, and Objective-C.

1

u/[deleted] Jun 05 '19

Yak shaving joke. MacPorts has a dmg installer you can use to install ruby and then brew.

You can just download the Ruby binaries, extract them to wherever you like (since you wouldn't be overwriting any preinstalled version), point your $PATH there, and after that it's not much different than if they came with the OS.

LLVM and clang come with xcode command line tools.

1

u/bumblebritches57 Jun 05 '19

Nope, MacOS does not include Clang (well, it kinda does in graphics driver frameworks, but it's compiled in and unavailable externally)

You have to either install Xcode, or the Xcode Command Line Tools to get it.

0

u/[deleted] Jun 05 '19

[deleted]

1

u/[deleted] Jun 05 '19

Stand back. I have a compiler and I know how to use it...

Not that it's necessary when you can just get the bottles.

→ More replies (24)

3

u/[deleted] Jun 05 '19

I don't use python, perl or rub y. Following Standard Apple User logic, I should be saying "Finally! This is great!" ...

But I won't.

An OS should come packing with a certain amount of swiss army knife utility. For people who use those tools or for some things like say Homebrew, that do use ruby, this just makes everything one step more difficult for installation and maintenance since you can't rely on some kind of default base set of tools anymore.

Consistency is also important. Because past OS have had this, future should too unless there is a really strong reason to change.

2

u/guygizmo Jun 05 '19

I know we're going against the grain here, but yes! This pretty much mirrors how I feel. Having those tools available for software to utilize is a great strength of the OS, and if tools aren't around by default then that means you can't rely on them when developing software for general users.

Developers and power users won't mind your installation instructions including "use the command line to install X" or "download and install this package from Y". But for the commercial software I work on, the installation instructions can't be any more complex than "use the installer" or "drag this application to the Applications" folder. And that'll mean that I can no longer assume the user's system will be able to run Python, Perl, or Ruby scripts. It's a real bummer, because being able to leverage those scripting languages and runtimes is fantastic. I certainly don't want to write bash scripts!

44

u/Hennahane Jun 05 '19

I’m honestly glad. Dealing with multiple versions of ruby (because the system version was horrifically outdated) was a huge pain in the ass. I had similar problems with Python too.

11

u/cshaiku Jun 05 '19

Indeed. Dependency hell.

30

u/sunk_cost_phallus Jun 05 '19

I always need python 3 and rvm so it’s nice to lose the system versions. Keep things cleaner.

0

u/[deleted] Jun 05 '19

[deleted]

4

u/Doctorcherry Jun 06 '19

Do you really want Apple updating Python for you. Surely this is the type of thing you’d rather update manually? Especially if you’re running something which is critical to your work and has certain dependencies etc.

2

u/_xlar54_ Jun 05 '19

yeah, dont they like run updates immediately when you first run macOS anyway?

13

u/[deleted] Jun 05 '19

Always install your own. These are normally behind the current stable releases.

4

u/frozenpandaman Jun 05 '19

Happy cakeday!

2

u/[deleted] Jun 05 '19

Oh thank you! I didn't know

23

u/julietscause Jun 05 '19

As long as I can install it later on (as it states I can), im okay with this

19

u/dangil Jun 05 '19

How will I bootstrap brew?

12

u/[deleted] Jun 05 '19

With macports of course!

Something will be worked out by release. They could just extract the bottled ruby version in shell first and then everything else would be the same.

1

u/VitorMM Jun 05 '19

Thought just the same. It's a marvelous tool

0

u/[deleted] Jun 05 '19

[deleted]

15

u/bumblebritches57 Jun 05 '19

THANK GOD!!!

They're finally de-bloating it!

5

u/frozenpandaman Jun 05 '19

They really aren't that big of installs, to be fair.

6

u/_your_face Jun 05 '19

Small installs with lots of complications

11

u/sundryTHIS Jun 05 '19

thank god

4

u/[deleted] Jun 05 '19

Homebrew will stop working? It’s written in ruby and used to install rbenv

2

u/VitorMM Jun 05 '19

Most likely they will just use a different script language (like AppleScript, maybe?) just to install ruby and then run all the same.

Still, Apple should have warned that this was going to happen a long time ago, so devs could prepare themselves. I mean, they spoke about dropping 32 bit literally two years ago.

4

u/m-in Jun 05 '19

I say good riddance. They were always old versions – so old as to be nigh useless. Anyone who cares will have to hear installed from homebrew or macports already.

1

u/[deleted] Jun 05 '19

So how about updating them once in a while?

1

u/m-in Jun 10 '19

What’s the point? Nothing in the OS uses those, afaik.

4

u/Crasher401 Jun 05 '19

As a developer. FINALLY. No more broken dependencies!!!!!!!

1

u/mrfoof Jun 05 '19

If this bothers you, leave feedback

https://www.apple.com/feedback/macos.html

It probably makes sense to remove python2. perl5? Not defensible at all.

1

u/guygizmo Jun 05 '19

I've left feedback and bug reports many times, but it always feels like it just disappears into a black hole. I think this is one of those decisions that Apple's not going to reverse, so I'll just have to live with it. In the end it won't be that bad. I'll miss being able to easily have users run Python scripts though.

3

u/mrfoof Jun 05 '19

Whatever the utility of leaving feedback to Apple, it's probably greater than complaining about it here. I figure it's worth at least a minute of my time.

3

u/[deleted] Jun 05 '19

It's just the opposite. The system version of each language constantly conflicts with the actual runtimes you wish to run.

1

u/jeblis Jun 05 '19

I think this a good move. They want you to bundle a runtime with your app. Runtimes are generally small and it’s much easier to guarantee an app works.

1

u/guygizmo Jun 05 '19

I suppose there's something to be said for the version of a runtime you use with your app being consistent and frozen.

4

u/MatthiasSaihttam1 Jun 05 '19

Echoing what other people have said, I've been running python through brew and ruby through RVM for a while now.

Especially since python 2 is dead-dead at the end of this year, I think it makes sense to ditch it. I started a project just a couple of years ago in python 2 instead of 3 because that was what MacOS supported and I didn't want to deal with cross-major-version compatibility. This good news in my opinion.

4

u/fcddev Jun 05 '19

I think that it’s relatively inconsequential. There was real value in shipping all the language interpreters when it was painful to obtain them, but it’s no longer a big deal. The fact that you couldn’t get rid of the system installation when you had another, probably more up-to-date one was problematic.

4

u/schrodingers_cat314 Jun 05 '19

Thank you, finally.

Having an ancient python install cooked into the os was such a fucking annoyance.

2

u/CodyByTheSea Jun 05 '19

Time to use pyenv or virtualenv

2

u/CyberBot129 Jun 05 '19

Ideally you’d use virtualenv if you’re actually doing Python anyway, right?

1

u/CyberBot129 Jun 05 '19

Honestly you shouldn’t even be using python 2 at this point anyway

1

u/euphraties247 Jun 05 '19

A long long time ago the BSD subsystem stuff was mostly optional.

Although I'm not surprised that it'd all go. If Darwin had legs it'd easily fill the void.

1

u/tangoshukudai Jun 05 '19

Nice, install the latest version, and be done with it.

1

u/firelitother Jun 05 '19

I agree with Python being removed. I had to resort to using pyenv to use newer version.

1

u/[deleted] Jun 05 '19

Can’t the runtime environments for these be downloaded if needed?

1

u/robotsmakinglove Jun 05 '19

It might be great if Apple integrated a proper package manager then. Thinking back to when I learned to program, having a version of Python and Ruby (while maybe not the latest) reduced a huge amount of friction to getting going with those extremely popular languages. Learning how to install those languages, while trivial for experts, requires a huge initial knowledge investment.

1

u/[deleted] Jun 05 '19

Not to be devils advocate.

Perhaps "Apple" considers this as a "security risk".

1

u/zezgamer Jun 05 '19

I find it strange that they remove tools like this but leave Netcat alone, an old version of Netcat, but Netcat nonetheless.

1

u/[deleted] Jun 06 '19

Good

1

u/rotatingphasor Jun 06 '19

I guess that’s another step to installing home brew.

1

u/frozenpandaman Jun 05 '19 edited Jun 05 '19

OK, fine, but can we get in-box Homebrew, please? :P

0

u/cshaiku Jun 05 '19

Thank god. Python and Ruby are annoying as anything.

0

u/StoneColdAM Jun 05 '19

I’ve had some issues with versioning of Python using the MacOS build, not super horrible in hindsight, although it’d be nice if it still shipped with newer versions or something.

2

u/stjep Jun 05 '19

Isn't it better to just install it yourself so that you control what version you're on?

-6

u/nintendomech Jun 05 '19

Well that sucks. Lots of developers using Mac like me. I use python a lot.

9

u/stjep Jun 05 '19

Download it from python.org and install it. You get two benefits: it won't be out of date, and you control the version.

macOS shipped with Python 2.x, which is not what anyone should be using these days anyway.

→ More replies (2)

-3

u/Buffalocolt18 Jun 05 '19

REEEEEEEEEEE

-1

u/GroMicroBloom Jun 05 '19

No! At least not Python!

Then again, the version they ship with macOS is so outdated that I guess it doesn't really matter. You have to manually install a more recent build of Python 3 anyway for most situations.

1

u/mcbridedm Jun 05 '19

I suspect this is the main reason...its a pita to maintain them.

0

u/[deleted] Jun 04 '19

[deleted]

-7

u/guygizmo Jun 05 '19 edited Jun 05 '19

Maybe I'm just lucky but I've never had a conflict with the system version of Python. And being able to rely on it being there was great for installation scripts and executing background scripts from an application.

edit: Jeez! I didn't realize not having software blow up in my face would be so unpopular! Well worry not, downvoters, because every other piece of software constantly blows up in my face. I'm a paranormal magnet for bugs.

6

u/Dalvenjha Jun 05 '19

You’re lucky...

0

u/[deleted] Jun 05 '19

[deleted]

18

u/[deleted] Jun 05 '19

They should've updated to python3 like everyone was supposed to 10 years ago.

0

u/[deleted] Jun 05 '19

[deleted]

18

u/CheapAlternative Jun 05 '19

It would also break everything all the time, removing it punts the problem down the line.

Would be nice to have an officially supported package management solution though.

10

u/djcraze Jun 05 '19

Like homebrew? Or you mean by Apple?

1

u/[deleted] Jun 05 '19

Except Linux distributions are able to keep python up to date without making the world explode. Has Apple's software quality really gotten that bad?

2

u/CheapAlternative Jun 05 '19

Linux distros tend to have a blessed global package management system of some kind which helps but and aren't faring that much better either. A lot are going to be stuck with python 2 well past the EOL date and rely on Google for ongoing support IIRC.

2

u/[deleted] Jun 05 '19

Most distros moved to exclusively python 3 several years ago now.

2

u/CheapAlternative Jun 06 '19

Core distros but not all the apps/libs.

6

u/_your_face Jun 05 '19

That’s kind of the point, Apple included it when Apple was trying to build a presence and maintaining their own versions of java, python etc was worthwhile as a way to establish the platform as a serious ‘nix platform and getting these things setup by your self was a real barrier to entry. Now it’s so damn easy, the communities are flourishing, Apple doesn’t need to manage and test their own package, just let people install the ruby and python versions they want with home brew or the package installer of their choice. I’m ok with this now, it’s more difficult getting around the system included versions than the benefit they provide. It was meant for basic support. Now most people using it are devs and some old stable version doesn’t cut it as often.

1

u/wpm Jun 05 '19

Probably down to licenses.

0

u/[deleted] Jun 05 '19

[deleted]

0

u/[deleted] Jun 05 '19

[deleted]

1

u/Monotonousness Jun 06 '19

Oh look it's that MS shill that can't handle a single positive thing Apple does.

You're the fucking worst.

0

u/[deleted] Jun 05 '19

[deleted]

2

u/[deleted] Jun 05 '19

Red Hat still backports patches to the old versions. What do you think they do, just let every old version rot but pretend it's still secure? That'd be Apple you're thinking of, friend.

0

u/[deleted] Jun 05 '19

[deleted]

2

u/[deleted] Jun 05 '19

They don't have legacy python. Python 3 is the only version shipped in RHEL anymore.

Source: I'm sitting in front of an RHEL server right now.

0

u/[deleted] Jun 05 '19

[deleted]

→ More replies (1)

0

u/[deleted] Jun 05 '19

[deleted]

1

u/guygizmo Jun 05 '19

Ah, this makes sense. That answers why they're doing this, and more importantly, why Apple constantly included out-of-date versions of the runtimes in macOS.

This is a not-big-deal unless Apple stops allowing us to install things from a shell or otherwise not on the App Store.

This worry is ever-present. Who knows if they'll finally do that, but each release of macOS makes things more restrictive than the last one.

1

u/AberrantRambler Jun 05 '19

This worry is ever-present. Who knows if they'll finally do that, but each release of macOS makes things more restrictive than the last one.

I mean that worry would be ever present on any system you don't fully control - that the owner/designer of said system will make a change that you don't want or like.

Additionally I feel that worrying about that NOW on Macs seems pre-mature (particularly with marzipan/catalyst apps being able to be distributed outside of the App Store).

0

u/[deleted] Jun 05 '19

[deleted]

1

u/guygizmo Jun 05 '19

Recent new restrictions that have been a thorn in my side as an Apple developer that works on input drivers and automation apps:

  • Kernel extensions need explicit permission to load from the user

  • Kernel extensions must now be notarized, and soon all apps will have to be as well

  • AppleScripts can't run without each script being granted explicit permission for each app that tries to run it

  • Apps that post mouse and keyboard events must be granted explicit permission to do so

Couple that with the APIs and terminal commands for managing all of these restrictions being half broken and it can be a nightmare to deal with sometimes.

And that doesn't include all of the restrictions introduced by SIP several years ago.

And yes, many (but not all!) of these restrictions can be turned off, which is fine for individual power users. But when you're writing software for general users then you can't ask them to turn off most of macOS's security features, especially when that involves booting into recovery mode and entering terminal commands. Software has to work out of the box.