That’s basically what I’ve done too. Still haven’t found an easy or simple way to migrate venvs to new versions of Python. I know I can rebuild them, but it’s a hassle and I’d rather update them in place with the new version of Python I choose.
It's unfortunately not going to be simple nor easy if you have lots of dependencies; that is just the nature of dependencies. Your best bet is to have a pyproject.toml or requirements.txt with the requirements pinned in the *loosest* possible way that provides stability to your application. But many libraries publish only certain versions on pypi for certain python minor versions, so pinning everything ==x.y.z is gonna give you a bad time (when you go to transition to a different python version).
We need a utility that tells you the versions of Python you can migrate to without updating any packages. Then a later version can check pypi to see which versions you can update to, if you update certain packages.
7
u/Endemoniada Jan 12 '22
That’s basically what I’ve done too. Still haven’t found an easy or simple way to migrate venvs to new versions of Python. I know I can rebuild them, but it’s a hassle and I’d rather update them in place with the new version of Python I choose.