How to recreate python virtual environments for older python versions?

I have been using python 3.6 and python 3.10 versions in virtual environments for special applications. However after upgrading to opensuse Leap 16.1 these are no longer working. Is it possible to recreate them from scratch ?

If you are in need to convert old python scripts, this thread may help you:

In anaconda python application (and the smaller miniconda or miniforge) as user you can create environments using any version of python including v2.7

tom kosvic

I think the answer depends on which manager you used for creating the environment[1]. I mostly stick to python’s venv, and keep my works updated regularly.

Everything is quite accurately explained on this stackoverflow thread. The answer is Ubuntu-based, but if you find an openSUSE repository with older python versions, than the idea would apply here as well. I did not find one.
But then, you can certainly build an older python version from source from the official Python site, optionally link it to your system binaries, and then execute venv from there.


  1. see answer by @tckosvic plus mamba and micromamba :wink: ↩︎

You may request a specific python version using the ‘uv’ manager:
uv venv --python 3.11.6

1 Like