Live data from Hacker News

Escaping from Anaconda's Stranglehold on macOS

paulromer.net

191–200 of 286 posts

Re: Escaping from Anaconda's Stranglehold on macOS

#191
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…

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 versi…

I have been out of the loop with Python for a couple years at this point, but how could this get so bad?

If you are looking into a system you are unfamiliar with, where do you look first?... pip? pipx? homebrew?... or is it in anaconda? pyenv?... must be in the os package manager... apt? pacman?

Honestly, Maven and NPM look great compared to this mess.

Re: Escaping from Anaconda's Stranglehold on macOS

#192

> 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…

I teach using python. You should try explaining virtual environments to students, most of them with no programming experience, or any real notion of the state of a computer system. I do, because we recommend students use them. Every class consists of endless debugging of student systems. After that you might understand the OP's viewpoint.

Reckon they'd understand using something like asdf instead?

https://asdf-vm.com

The projects I work with have moved to it because it handles multiple languages (not just Python). It's made things easy to keep "the correct version of a language" that each project needs.

So far so good, anyway. :)

Re: Escaping from Anaconda's Stranglehold on macOS

#193

Earlier quoted context omitted.

Yes. I recently had to debug my gf’s entire work computer setup getting fubar’d from installing a pip package at a user level that conflicted with the name of some package used internally by the 10k+/seat/year software the company devices have installed. Proximal cause? The installer “helpfully” failed over to installing at the user level when she didn’t have permissions to write to the place she told it to. Root cau…

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

Python's package management makes JavaScript look well thought out and sane.

The bar is so low, you have to excavate it from a landfill of rotten node_modules...

Re: Escaping from Anaconda's Stranglehold on macOS

#194

Earlier quoted context omitted.

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 versi…

I have been out of the loop with Python for a couple years at this point, but how could this get so bad? If you are looking into a system you are unfamiliar with, where do you look first?... pip? pipx? homebrew?... or is it in anaconda? pyenv?... must be in the os package manager... apt? pacman? Honestly, Maven and NPM look great compared to this mess.

NPM to me is the great example of a package manager that worse than anything the Python community has come up with, but that's subjective I think.

Python isn't as bad as people make it out to be. There are some issue that you will run into if your project/code base becomes really large, but that's not an issue for most people. The vast majority can get just use python -mvenv .venv to set up a virtual environment and install in that using pip.

Next step up is you need specific versions of Python, so you switch to pyenv, which functions mostly like the built in virtualenv.

Then you have the special cases where you need to lock dependencies much hard than pip can do and you use poetry, pip is to slow so you use pipx. Those are edge cases to be honest. That's not to say that they aren't solving very real problem, but mostly you don't need it.

It would be great if there was one tools that could do it all, lock the Python version, do quick dependency resolution and lock them down.

So far Python has opted to split the problem: Tools for locking the Python version, tools for creating separate environments and tools for managing packages. There's a lot of crossover in the first two, but you can pretty much mix and match virtual environment tools and package managers anyway you like. I think that's pretty unique.

Re: Escaping from Anaconda's Stranglehold on macOS

#195
Alas, the audience targeted by the post would most likely have preferred a video of the instructions rather than text. For tasks related to configuring a visual computing environment (such as the desktop), this would also make some sense.

Might be a lost cause in the tiktok era, but the text / command line / unix pipes paradigm of computing is extremely powerful and it would be a blessing if educators would find way to make it attractive to students...

Re: Escaping from Anaconda's Stranglehold on macOS

#196
post #186
post #134

Earlier quoted context omitted.

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.

Thanks, that makes sense.

Re: Escaping from Anaconda's Stranglehold on macOS

#197
post #155

I appreciate all the comments. I agree with most, even when they disagree with me or each other. I especially agree with the questions several people raise: What it is that we should teach? In which order? I think there is a consensus about what a student should end up knowing. Even if they are not going to become developers, they should be able to edit text files; they should be able to run commands from the termina…

Are you familiar with Software Carpentry? If so, what do you think about it? -> https://www.ub.uio.no/english/libraries/dsc/carpentry-uio/

Re: Escaping from Anaconda's Stranglehold on macOS

#198
post #155

I appreciate all the comments. I agree with most, even when they disagree with me or each other. I especially agree with the questions several people raise: What it is that we should teach? In which order? I think there is a consensus about what a student should end up knowing. Even if they are not going to become developers, they should be able to edit text files; they should be able to run commands from the termina…

If they are unable to use a shell, don't understand environments etc. I would push them onto some specific IDE/plugin combination that creates a new virtualenv, handles PATH etc. for every new project.

Dealing with environments and understanding how different parts of the filesystem relate to each other is its own pretty steep learning curve. You wouldn't want them to get tripped up on that while they are learning to program, so I think I would opt to teach the two as entirely different concepts and not mix them at first.

No idea if an appropriate IDE/plugin combination exists! Surely there is one.

Re: Escaping from Anaconda's Stranglehold on macOS

#200

> 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…

I have never broken my Python installation on Windows (official installer) despite recklessly installing anything. If I had broken it, I would have just uninstalled and reinstalled. While not familiar with macOS (topic of this article), I think the Mac installer works the same. On Debian of course you can cause great damage because the system Python is used for critical system functions. This is silly, I think the sy…

To be clear, there's absolutely nothing broken about the system Python in the article. There is just a shell alias causing the anaconda version of Python to be launched instead when you type `python3` at the command prompt...
Post reply on HN