by mmh0000 · 2y ago · 0 comments
This is a clean install of Python straight from the Python developers in a clean container. And it doesn't work. I figured I must need "points" so I pip-installed that.
Feels like every time I try to use Python, stupid, incomprehensible errors such as this occur:
```
root@1623eb794014:/# ./tri.py
Traceback (most recent call last):
File "//./tri.py", line 6, in <module>
from points import Point, Block
ImportError: cannot import name 'Point' from 'points'
(/usr/local/lib/python3.12/site-packages/points/__init__.py)
```> this code is shared to show the algorithm, not as a drop-in application that just runs. It depends on two private modules configmanners and Points. Both of these are on github
I don't know why you would find this so confusing, or blame Python. The author literally explains that the points module is not on pip. You installed some random pip package and expected it to replace a different dependency.
Please note: this code is shared to show the algorithm, not as a drop-in application that just runs. It depends on two private modules configmanners and Points. Both of these are on git hub, but to put them upload them to pip would be to commit to supporting them in perpetuity. I'm not willing to do that.
Working in Python in the 2000s, I was extremely happy. Working in Python (especially ML and data science applications) in the 2020s is a nightmare. The world has come a long way, and Python has actually taken a backslide.
Python would do well to learn from the Rust project and their Cargo package manager and tooling.
The author didn't include one of his custom source libraries that's not needed to understand the code, so that makes this a valid criticism of the Python community? lol
The code shouldn't build, go green, or be in any shareable state. This is horrifically bad practice.
A language should remove all of these thorns in a first-class manner.
Until you use a package manager like Cargo, you probably can't intuit the wide gulf here. A good analogy might be imagining the world before version control.
Dependency control matters immensely. Hermeticity and repeatability matter immensely. We should strive to build these into the very foundations.