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

View all comments

Show parent comments

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.