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

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

0

u/[deleted] Jun 05 '19

[deleted]

→ More replies (4)
→ More replies (1)

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.

→ More replies (1)

2

u/py3_ Jun 05 '19

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

→ More replies (3)

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?

→ More replies (1)
→ More replies (5)