Live data from Hacker News

Escaping from Anaconda's Stranglehold on macOS

paulromer.net

201–210 of 286 posts

Re: Escaping from Anaconda's Stranglehold on macOS

#201
post #117

Earlier quoted context omitted.

Because every option sucks for teaching. C/C++? Full of footguns. Java/C#? Too complicated for beginners. Pascal? Outdated. Etc. I personally prefer C to teach first-year CS students but just as the lesser evil. A good first programming language is sorely lacking. (Note that I'm talking about the imperative programming paradigm. The debate on whether one should start with functional programming is outside the scope o…

It's weird you throw out Java because they are the teaching language. They're the stick everything else is measured against. CS101 is a sea of Eclipse. Having a programming environment where all the major structures are discoverable through menus is actually pretty useful.

Java is popular as a first language, but I think it's just due to its (bygone?) general popularity. I don't think a language that forces you into a one-class-per-file mindset from day one has any business being used for teaching; students should start from the basics ("commands"/function calls, if, while, for, ...) and then discover what more complex concepts do within that framework.

Java's tooling is nice, but frankly Turbo Pascal (or something at its level) is enough for beginners.

Re: Escaping from Anaconda's Stranglehold on macOS

#202
post #176

> 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 don't see how it could be correct to say that I'm recommending that students pip install into the system Python. On macOS, there hasn't been a system Python since 12.3 came out in Jan of 2022. And as far as I know, there was never a system Python on Windows.

> On macOS, there hasn't been a system Python since 12.3 came out in Jan of 2022

It may not be pre-installed, but if you install Xcode it will also install python3 in /usr/bin/ for you...

Re: Escaping from Anaconda's Stranglehold on macOS

#203

Earlier quoted context omitted.

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…

It's definitely unique, but the "out of the box" experience is suffering for it in my opinion.

I actually recently had to fix something small in a Python project, pip refused to work because of homebrew, homebrew didn't have the dependencies and directed me to pipx, pipx finally worked - It was a strange experience.

And for the record NPM mostly has a bad reputation because of its past... nowadays it's perfectly usable and can lock dependencies and node version "out of the box".

Re: Escaping from Anaconda's Stranglehold on macOS

#204

Earlier quoted context omitted.

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…

It's definitely unique, but the "out of the box" experience is suffering for it in my opinion. I actually recently had to fix something small in a Python project, pip refused to work because of homebrew, homebrew didn't have the dependencies and directed me to pipx, pipx finally worked - It was a strange experience. And for the record NPM mostly has a bad reputation because of its past... nowadays it's perfectly usab…

> It's definitely unique, but the "out of the box" experience is suffering for it

The tooling that ships with Python could be much better, I'd agree with that. You can go pretty far with venv and pip, but just the python3 -mvenv .venv isn't exactly a great example of user friendliness at work.

Re: Escaping from Anaconda's Stranglehold on macOS

#205

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.

I actually like Python's package management (with just pip and venv). It's different to all other modern solutions, taking a per-shell rather than per-project approach, but that doesn't mean worse.

The advantage is that it's less "magic" than, say, npm. No need for rules saying how to find node_modules, you just have a PYTHONPATH env variable.

The Rust and Java approach is to do everything through a build tool's CLI, and I can't complain about that. It's probably the best compromise: Less magic than npm, and more user-friendly than Python.

Re: Escaping from Anaconda's Stranglehold on macOS

#207
post #68

Earlier quoted context omitted.

Does it handle binary dependencies and Python ABI changes well? Does it isolate them from almost the entire operating system? Conda does those. Conda packages compiled such that the search paths of the binaries are not using the OS's (which why the Linux DE Qt theme doesn't work for Spyder). Conda also comes with well optimized binaries for high performance compute which is absolutely a must for modern data science.

Use docker/podman if you are worried about ABI changes and isolating them from the entire operating system. Most people's problems getting their Python toolchains to work optimally are caused by using operating systems that don't come with build utils. That's a cultural problem solved by using an operating system with a culture of distributing those tools.

Or use conda.

Re: Escaping from Anaconda's Stranglehold on macOS

#208
post #57

Earlier quoted context omitted.

I thought a class of entirely non-tech art students how to use the commandline to run their python code within an hour and that includes distractions like people using multiple different operating systems and explai ing how paths work on each. Tech inclined students get the gist of the whole thing in less than 15 minutes. The CLI is literally just: You write a command and a thing happens. That isn't a thing that peop…

If anything I think a pure CLI environment would be easier for a lot of people than the incomprehensible skeumorphism-less jumble of controls that a lot of GUIs have turned into. Everything is built in text and done one command at a time, so there's much less mystery compared to trying to figure out what's even a button or not.

I don't understand the mentality myself, but some people just turn off their brain immediately if you say "command line", but somehow they see the arcane key combinations that you have to remember and do in the right sequence as more of an exciting challenge.

Re: Escaping from Anaconda's Stranglehold on macOS

#210

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

You’re swapping something that can be feasibly debugged or at least easily burnt and reformed for something that’s impossible to untangle once they’ve done two projects with different or conflicting deps into the base environment.
Post reply on HN