top | item 20110484

(no title)

DividableMiddle | 6 years ago

This has been a topic brought up internally at Apple many times over the past decade. Glad to see it finally moving forward. Although I see the benefits to having a system-version of these packages.. if you're doing anything serious for production then the environment should be containerized.

discuss

order

Waterluvian|6 years ago

Python and pip just being there is a huge advantage for newbies. I really think that part of programming is constantly ignored because all the decision-makers are not newbies.

dcosson|6 years ago

It's honestly terrible for newbies. If they try to use it, there's no pip included. So then they easy_install all their libraries which installs things into different places than most python devs will be used to. Or they easy_install pip first. But even still, everything is installing to system paths, so when they try to install things it fails with permission errors. They find a stack overflow post that says just "sudo" everything and they go to town. And there's no way to reset anything when it gets borked either because it's the system install.

Compare that to "brew install python". Now you have the most up to date version, with the right permissions for your user, that you can always brew uninstall and reinstall later if you need a different version or a clean install.

AlexeyBrin|6 years ago

AFAIK, macOS comes with Python 2.7 and without pip. For any serious, modern, Python development you need to install Python 3 yourself.

benatkin|6 years ago

Not true. It's better for them to install it themselves so they know exactly what they're using, and so they type python for python 3 and not python3.

sametmax|6 years ago

Not only pip is not provided, but virtualenv neither.

The alternatuve to the current decision is for apple to assign people to keep updating python and provide previous versions as packages like linux distrib does. But it has never been the way they do business.

arvinsim|6 years ago

Learning how to install Python and Pip should be part of the learning process for newbies.

rurban|6 years ago

The problem is not doing anything serious. Of course this would need an updated language runtime.

The problem is doing something simple, like an installer. bash => zsh: fine. You can still install with the old /bin/bash. but for many cases a shell is not enough, and then you have to compile something statically for a trivial dynamic task. Which makes the download 10x larger. Not cool.

tlrobinson|6 years ago

It seems like there’s an opportunity for a lightweight statically-linked scripting language. Something between Go and Python.

erikpukinskis|6 years ago

> if you're doing anything serious for production then the environment should be containerized.

What do you mean?

__full_pint|6 years ago

I’m not OP but:

When you build and package things for production you should create an environment. This ensures the packaging the right versioning of requirements for build.

Say you build using the system version but use packages based on another version. It may work for you but probably won’t work elsewhere.

ynx|6 years ago

at the very least, virtualenv (for Python) to isolate the library dependencies from the system libraries.

new_realist|6 years ago

Does OSX offer reasonable container technology? chroot?

m463|6 years ago

I think apple fundamentally does not understand containers.

All the interesting container stuff is on other platforms.

It might be out of fear, maybe because apple doesn't want macos to be virtualized.

It would be really nice to have say the current xcode in one container and a dev xcode in another. It would be nice to farm work out to a lot of machines.

or a dockerfile like: FROM macos:10.14

RUN installer xcode... RUN xcode-build myproject

Gaelan|6 years ago

I imagine you could get pretty far with sandboxing+chroot, but it wouldn’t be docker. You’d definitely be able to prevent stuff in the container from getting out, but I’m not so sure you could reproduce docker’s “VM-like” (I.e. the inside of the container is ~identical to a normal Linux machine, with no need to make stuff compatible) quality.

wedn3sday|6 years ago

Singularity recently released a (non-fully featured, but still useful) mac version.