I really love miniconda for managing python versions and deps myself.
Conda/Miniconda randomly breaks every few months or so when updating and I can't fix it. Idk why I stick with it, its been like this for years.
Pyenv – lets you easily switch between multiple versions of Python
201–210 of 341 posts
Re: Pyenv – lets you easily switch between multiple versions of Python
#202Earlier quoted context omitted.
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 complain…
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…
Re: Pyenv – lets you easily switch between multiple versions of Python
#203Tools you can use to make sure the Python program you wrote keeps working: requirements.txt, pip, pipenv, pyenv, virtualenv, pyenv-virtualenv, virtualenvwrapper, pyenv-virtualenvwrapper, venv, pyvenv, conda, miniconda, poetry, docker, nix. Which ones did I miss? Which of them actually ensure your program always works the same as when you first wrote it, without asterisks?
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 complain…
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
Re: Pyenv – lets you easily switch between multiple versions of Python
#204Earlier quoted context omitted.
So, what is "the tool for beginners fighting with python packaging problems"? That is, the pattern seems to be that someone mentions a solution, then a zillion responses as to why it sucks. Is there any tool or pair that sucks least for most cases and beginners? I get that every case is different, but perhaps there are some useful starting points?
You could just give up and resort to using Docker.
Re: Pyenv – lets you easily switch between multiple versions of Python
#205Earlier quoted context omitted.
Also a bit confused as to why this is currently the #1 post.
Because it's not a solved problem, pyenv is niche and people discover it once again and think that they finally solved their pain. They will try it, and most of them will pay the price for it. It's a cycle.
Re: Pyenv – lets you easily switch between multiple versions of Python
#206Earlier quoted context omitted.
Because it's not a solved problem, pyenv is niche and people discover it once again and think that they finally solved their pain. They will try it, and most of them will pay the price for it. It's a cycle.
Cue ominous Reaper sounds
Re: Pyenv – lets you easily switch between multiple versions of Python
#207I used to use this a lot when working on a Windows machine. Worked pretty well. But nowadays Nix solves the same problem in a fully general way, for all software rather than a single language. You can have whatever versions of whatever you want, side by side, without interfering with each other.
Re: Pyenv – lets you easily switch between multiple versions of Python
#208Re: Pyenv – lets you easily switch between multiple versions of Python
#209Earlier quoted context omitted.
As. Homebrew maintainer: confirmed. You can also adjust your settings to pin versions or avoid cleanup, too. ‘brew pyenv-sync’ may be useful around this area, too.
If I pin a version of Python, isn't that going to wreck any tooling that depends on it? Unless you're saying have multiple versions of Python installed. This is practically the only remaining annoyance I have with the Python ecosystem (relative imports aside). I use some tools, like Glances [0] whose formula relies on a much newer version (3.12) than the actual package requires (3.8) [1]. So when there's a Python upd…
Re: Pyenv – lets you easily switch between multiple versions of Python
#210I have to warn again users that think they have found the silver bullet that pyenv comes with a big caveat: it compiles python on your machine. The number of possible modes of failure in this situation is huge. See also: "Why not tell people to "simply" use pyenv, poetry or anaconda" https://www.bitecode.dev/p/why-not-tell-people-to-simply-use I'm not saying pyenv is not a useful tool, but it is not a tool for beginn…