3 ms·
I managed to avoid Python 2 for nearly 3 years now in my projects, I think it is time to get rid of it for good and use the new freedoms to improve the tooling.
by atoav 6y ago
I managed to avoid Python 2 for nearly 3 years now in my projects, I think it is time to get rid of it for good and use the new freedoms to improve the tooling.
It is so ironic that in Python the most "unpythonic" thing is the version management of the language and libraries etc itself.
Something like python poetry, venv etc are great steps into the right direction, but there should be an official solution that "just works" and is predictable.
When I give python courses I usually skip dependency managment and explain it in the very end because it would probably (rightfully so) break the will of everybody involved. It shouldn't be like that
- StavrosK 6y agoI think that currently the biggest nightmare when it comes to packaging is that installations are usually not self-contained. If you can create a virtualenv or run Poetry, your headaches are over and you'll have a very pleasant experience. I don't think I've ever had a problem running stuff with Poetry and the way it does locking. All the problems come before that point, with multiple installations making it so you don't know which installation you're using, which version, etc.
- mixmastamyk 6y agoNot sure what I’m doing “wrong,” but I have no nightmares packaging Python, it all just works. I suppose some ecosystems have done it better, but no complaints from me.
- StavrosK 6y agoAre you on Linux? People with Macs and Windows seem to be having more problems, because on Linux there's usually one canonical Python installation, whereas on Mac you usually have one from brew, one from Apple, maybe one you downloaded from the site, and whenever you try to install things it's a gamble which Python was used.
- mixmastamyk 6y agoYes, Linux. Also, I know how to use a shebang, which command, install to user, and/or pythonX.Y -m ... to avoid problems. Perhaps newbies don’t get enough of that advice? I try my stuff on macos without issue, but perhaps not there enough to have big problems.