News for hackers. Stuff that matters.
Re:Pyenv – lets you easily switch between multiple versions ... by infecto on Monday March 25, 2024 @07:44AM (#39815072)
I am always curious how many people, outside of those building code for third party clients, actually hit this problem? In the 10+ years of using Python I have never had a problem using the core tools. The ecosystem is far from perfect but it has never cause me a problem.

Edit: Wow y'all are some sour people for voting down this question. I truly wonder how often people run into this problem compared to just complaining about it.

Re:Pyenv – lets you easily switch between multiple versions ... by renegat0x0 on Monday March 25, 2024 @07:55AM (#39815158)
I am not sure about what 'core' means in this context.

In my edperience I had many many problems with OS packages vs pip installed ones. There were really strange dependency issues.

In some cases I encountered dependency hell.

Even if somebody said to me that the core means also using virtualized en I would disagree as places over Internet not always explicitly guide you in that route.

Re:Pyenv – lets you easily switch between multiple versions ... by wodenokoto on Monday March 25, 2024 @08:43AM (#39815606)
Just getting me and one coworker in sync on our dev machines often causes problems. Even more when we try to deploy to a cloud service which relies on pip.
Re:Pyenv – lets you easily switch between multiple versions ... by thebytefairy on Monday March 25, 2024 @09:58AM (#39816386)
If I were writing applications only for myself it'd be fine, but I've definitely run into issues when writing code with others - teammates, open source repos, etc.
Re:Pyenv – lets you easily switch between multiple versions ... by crabbone on Monday March 25, 2024 @10:17AM (#39816641)
Working in CI in a company that has couple dozens of Python packages: I'd say about once a week. There are some weeks with no incidents, and there are weeks when everything is broken for many days straight.

NB. The latest incident was Friday when I've discovered that some CI pipeline ran `setup.py install` that down the lane invoked easy_install, which doesn't have a policy of ignoring bizarre versions s.a. X.Y.Zrc1 or X.Y.Zb2 etc. It ran aground when it was trying to install scikit-learn which wanted NumPy >=X.Y.Z, but it already installed X.Y.Zb1, and it didn't realize that this version should be OK (also, it shouldn't have installed non-release versions anyways).

Re:Pyenv – lets you easily switch between multiple versions ... by sumtechguy on Monday March 25, 2024 @10:42AM (#39816948)
I just hit it a few days ago. 3rd party script that I did not write. The dev has lost interest in it 3 years ago. It is written for 2.7.x (and it is a nontrivial amount of code). So my choices are some sort of pyenv thing (or one of them), or fix up the script myself so it runs on 3.12. I lucked out and someone else had already done the second thing. One project I worked on was 2.4.x. If they ever have to update that (which I hope they have) to something more recent I could see them doing it until they port it over. That is not even a lib or anything that is just the main prog.
Re:Pyenv – lets you easily switch between multiple versions ... by airstrike on Monday March 25, 2024 @12:31PM (#39818324)
download python 2.7 and run it? no pyenv needed
Re:Pyenv – lets you easily switch between multiple versions ... by Hackbraten on Monday March 25, 2024 @02:03PM (#39819439)
2.7 has been EOL for five years. It doesn’t get security updates nor bug fixes.
Re:Pyenv – lets you easily switch between multiple versions ... by akurtzhs on Monday March 25, 2024 @02:37PM (#39819781)
Python Foundation support ended that long ago, but vendors maintained it for longer. Red Hat support for it through RHEL 7 ends 30 June 2024, however, and my guess is they’re the last ones.
Re:Pyenv – lets you easily switch between multiple versions ... by sumtechguy on Wednesday March 27, 2024 @11:02AM (#39840190)
For this use case it is probably fine to have 2.7.x installed to use for this. Just annoyed. The downside to having it that way is this weird stray python installed. Would rather use something to switch it around to make it easier to keep track. But in the end it didnt mater as someone else had already updated it and I did not have to bother. Maybe next time :)
Re:Pyenv – lets you easily switch between multiple versions ... by wongarsu on Monday March 25, 2024 @12:31PM (#39818329)
Just a requirements.txt that you can install with pip in a venv works 95% of the time. Unless you need a specific python version, which you only figure out halfway through by reading the documentation. Or you are using pytorch, because on windows and linux the version on pypi lacks GPU support, but there's no good way to encode the download url in your dependencies. Or when people don't properly maintain the requirements.txt, because you are supposed to somehow manually keep it in sync.

I run into some kind of packaging or dependency problem for basically every non-trivial project. Hence the many "solutions", but somehow most end up worse than the problems they attempt to solve