Hacker News new | ask | show | jobs
by robsws 1410 days ago
The article is kind of hyperbolic, but I feel like it echoes how I am beginning to feel about Python.

Just last week, I spent a whole afternoon getting a particular repository of Python code running on my laptop, even with the help of virtualenv and pyenv. requirements.txt doesn't tell me which version of Python the code was developed with, and several libraries are only available on certain versions, so I have to play the guessing game first of all. Then, some of the modules don't have binaries available for M1, and I can't build them from source because I don't have x, y, and z tools installed. Then there's always some issue with PYTHONPATH. I ended up having to build the whole Ubuntu docker container and develop inside that.

I love Python, it's not always like this, and it's certainly not only Python, but that experience is something I dread anyway coming in to every new Python project. It feels like DLL hell all over again. I have had a much better experience personally with C# and Rust, but admittedly I had much more solo control over those projects.

1 comments

you write: "requirements.txt doesn't tell me which version of Python the code was developed with". Do you expect to have less pain with any othe rlanguage with this situation?
I'm not saying other languages don't have the same problems, but this just hasn't been as much of an issue in my experience when working with other languages.

C# for example - I had some compatibility issues between versions 2 and 3.1 of .NET Core, but at least the .csproj tells me what version it's supposed to be built with, and the LangVersion property indicates the version of C#.

Rust has a way to specify the minimum rustc version.

https://doc.rust-lang.org/cargo/reference/manifest.html#the-...

Rust is so cool. In python's requirements.txt you can put something like:

tensorflow >=1.12,!=2.1.*

“Here is a binary” sounds a lot less painful.