2 ms·
If you use conda, you are in a different world, so, none of what you listed above is of any use to you. But, say, you wanted to go from Anaconda Python to what
by crabbone 4y ago
If you use conda, you are in a different world, so, none of what you listed above is of any use to you. But, say, you wanted to go from Anaconda Python to what I call PyPI Python, then there are two distinct ways.
Way 1: You prefer consensus over quality
Python infrastructure tooling is god awful. It's so awful it's on the level of its own. You just don't get things so bad from other popular tech. Python also has a community that's driven by personalities and dogma, because most of Python community is very bad at programming, so, instead of deciding for themselves the community is dedicated to following "best practices" which they don't understand, but which guarantee that a randomly selected person from the same community will be able to use your project.
If this is your case, then strike out poetry and virtualenv from your list, and that's the typical setup. For people who are afraid of compiling Python pyenv provides a workable solution, while venv is the most popular tool for creation of virtual environments mostly because it's bundled with Python binary distributions (or those built by pyenv). Pyenv has its own virtual environments, but there's no reason to use those.
Poetry is a project that is mostly dedicated to installing Wheels, which is Python packages. It also has its own virtual environments. The problem with Poetry is that it can only deal with a subset of all packages that may be installed using other tools, i.e. pip and setuptools. It's somewhat better organized, but because it's a non-solution for a large fraction of problems in its domain, it will only work for you if you can make sure you will never need anything from that fraction.
Virtualenv is just a Python 2.X thing. You are unlikely to need it today. Basically, it does what venv does, however venv doesn't support Python 2.X.
Way 2: You want it to work well
I have bad news for you... that's not going to happen. Yet, you can improve your quality of life by ditching pyenv. There's no reason to use it, if you aren't afraid of building Python from source. That's how I always do it, and that's what allows me to make debug builds, if I need those, or apply patches if I need them, or simply build slimmer Python distributions, if I don't need some features (s.a. tkinter, or image processing libraries etc.)
----
NB. venv isn't baked into Python 3.X. You may choose to build a distribution w/o it (which is often the case for Python installed with Linux distros), but it's common in distributions intended for developers.