Live data from Hacker News

Escaping from Anaconda's Stranglehold on macOS

paulromer.net

181–190 of 286 posts

Re: Escaping from Anaconda's Stranglehold on macOS

#181

Earlier quoted context omitted.

this installer comes with an uninstaller https://install.determinate.systems/

Thanks for the link. Apparently there were issues even as recently as 4 months ago, specifically conflicts between the determinate installer and nix-darwin though I'm not sure they are intended to be used together. https://news.ycombinator.com/item?id=40158558#40159195

The issue is just that Nix-Darwin doesn't 'own' your system, and it's conservative about blowing away existing files when installing files that it has generated. So if it detects that some file it wants to install conflicts with an existing one, it throws its hands up and tells you to deal with it before it will proceed.

As it happens, /etc/nix/nix.conf is one file where such a potential conflict can occur. As an optimization, I think it will (sometimes? always? idr) replace a file if the existing one and its intended replacement have the same contents. The defaults /etc/nix/nix.conf in the mainline Nix installer and the defaults for /etc/nix/nix.conf in Nix-Darwin are the same, so it doesn't complain there. But the Determinate Nix Installer ships a nix.conf with different settings, so Nix-Darwin refuses to replace it, to avoid clobbering your (the Determinate Nix Installer's) settings 'changes'.

There's no real compatibility issue, and the Determinate Nix Installer is doubtless intended to be used with any Nix-based software, including Nix-Darwin, Home Manager, etc. Nix-Darwin installation is just a bit hairy, as it's unfortunately always been.

NixOS is a better experience in that respect, and you should consider running NixOS in a VM if you want to get a feel for that kind of systemwide, declarative Nix configuration without worrying about installing it against a foreign base system. (If you do learn your way around nixos-rebuild, you won't need the Nix-Darwin installer anyway.)

Re: Escaping from Anaconda's Stranglehold on macOS

#183

> 10. What Changes When You Are Free > You will not be forced to work inside something known as a “virtual environment.” Oof, this terrible advice cancels out an otherwise reasonable post. Beginners who don't know what they're doing are the last people who should be `pip install -r requirements.txt`-ing into the system Python the way this article is recommending. That's not only going to make working on multiple proj…

You are wrong: this was not a reasonable post.

Re: Escaping from Anaconda's Stranglehold on macOS

#184
post #169

Earlier quoted context omitted.

IMO what needs to happen is python needs to get rid of system installs and only work via venv. It should check the current folder for some .venv or something and auto-config itself to the current directory (or complain that you need to config with a messages like "python not configured for current folder. Run 'source bin/activate' to configure. Honestly thought that could be so much better. The entire problem of pyth…

Python developers agree. See PEP 668 – Marking Python base environments as “externally managed” – https://peps.python.org/pep-0668/

More recent document

https://packaging.python.org/en/latest/specifications/extern...

Re: Escaping from Anaconda's Stranglehold on macOS

#185
post #184

Earlier quoted context omitted.

Python developers agree. See PEP 668 – Marking Python base environments as “externally managed” – https://peps.python.org/pep-0668/

More recent document https://packaging.python.org/en/latest/specifications/extern...

Hmm that still recommends that distros allow admins to install to /usr/local, albeit in such a way that it at least can't break the OS.

IMO the idea that a 'Linux admin' is better informed than a 'Linux user' is increasingly anachronistic. In most cases the admin is just the user running sudo. I'd suggest that such functionality should be enabled by installing some kind of OS package rather than being the default

Re: Escaping from Anaconda's Stranglehold on macOS

#186
post #134
post #102

Earlier quoted context omitted.

What I do on every dev machine is build Python from source and install it to ~/.localpython and put it in my path. Then I can pip install away care-free, and quickly run scripts / repls without having to activate an environment.

Why does it need to be built from source for that?

It doesn't, but it's typically the simplest (for me). It also means I get exactly the version I want compiled with the best optimizations for that machine.

Re: Escaping from Anaconda's Stranglehold on macOS

#187

It’s always baffled me that the default configuration of conda takes the liberty of contaminating the default shell environment. It feels incredibly bold to assume that because I install conda I want it to exist in every context in which I use my computer. It’s the terminal equivalent to an adware “toolbar” installing itself in your browser.

Not only that, installation edits some of your dot files without ever telling you or asking permission.

Re: Escaping from Anaconda's Stranglehold on macOS

#188
post #169

> 10. What Changes When You Are Free > You will not be forced to work inside something known as a “virtual environment.” Oof, this terrible advice cancels out an otherwise reasonable post. Beginners who don't know what they're doing are the last people who should be `pip install -r requirements.txt`-ing into the system Python the way this article is recommending. That's not only going to make working on multiple proj…

IMO what needs to happen is python needs to get rid of system installs and only work via venv. It should check the current folder for some .venv or something and auto-config itself to the current directory (or complain that you need to config with a messages like "python not configured for current folder. Run 'source bin/activate' to configure. Honestly thought that could be so much better. The entire problem of pyth…

That depends very much on what you're doing. For production I'd like to use the OS package manager to install my Python dependencies, and move the responsibility of patching to the OS.

For workstations, absolutely, go with virtual environments, it's the only way to go. One concern I've seen from some in the machine learning space is that rebuilding a virtual environment, for example if macOS upgrades the Python version, takes hours. That can be solved by using pyenv, then you can have multiple versions of Python and be free of Anaconda. I primarily use pyenv to be sure that I have the same Python version that ships with the server OS on my laptop.

Re: Escaping from Anaconda's Stranglehold on macOS

#189
post #13

Earlier quoted context omitted.

At some point they'll have to learn about the file system, shell, network. Otherwise there is little point in learning Python. Octave, Matlab, Mathematica, Julia, R are superior for small programs with just a couple of functions. Escaping the stranglehold of Python would be the next project!

Matlab is a categorical loss due to its proprietary character, R debatable, Julia, maybe yes. Octave, while at least not proprietary, still surely not, if the task is anything but some matrix multiplication or matrices using program.

julia has an unacceptable overhead when running small programs. it works well for longer running workloads or extended interactive sessions, but for learning you want to be able to write and execute small scripts without feeling the perceptible lag every time. google up "time to first plot" for more on this.

Re: Escaping from Anaconda's Stranglehold on macOS

#190

Earlier quoted context omitted.

Python has dogshit package management that makes java look well thought out and sane.

PYTHON @&$!! The Python community needs to solve this ASAP. This almost weekly pain point has turned a language I used to love in college into one of my most despised languages. The fact that the ML community uses this broken platform is infuriating. Make a Python version 4 that focuses only on fixing the packaging. 100% per-project hermeticy. No global packages whatsoever. Solve just this issue and bring the entire…

As far as I'm concerned, this is the fix: https://github.com/astral-sh/uv
Post reply on HN