From the height of my Linux ignorance, I was quite surprised to see python packages were part of the updates we receive. That just crashed everything I was working on since this current version (3.13.2) is not supported and seem to be the default for the entire OS.
I thought venv was meant to isolate different python environments but apparently not that well. My different projects using pytorch or torchvision were using 3.11 or 3.12 venv but they don’t start anymore because of ‘you have 3.13.2’.
It is possible to stop those python updates?
Someone would know how to truly isolate an environment with a specific version of Python?
/usr/bin/python3 is a symlink to the system python. If you created a venv just by going /usr/bin/python3 -m venv than your environments interpreter will change when the system moves its default from one to the other.
The best way to create a venv is be specific with which python binary you’re developing against.
Your system still has 3.11 installed, you just need to create a new venv with python 3.11 and deploy into that.
Basically, you do not want to stop updates. You do want to be specific about what version of Python you are deploying with.
I am fine with updates, that is why I am using a rolling distro. I didn’t know they would impact languages and what I consider user elements.
I depend on some python modules and I can’t change them. They support python at least 3.10.x., which is still supported for 18 months, up to 3.12.
All my projects are in venv actually since the start with precise versioning. I thought it worked as you describe, until yesterday when everything stopped to work.
if I do a
xxxxxx@localhost:~/temp> python3.11 -m venv ~/.venv/3.11
xxxxxx@localhost:~/temp> source ~/.venv/3.11/bin/activate
What I get if I request the version is:
(3.11) xxxxx@localhost:~/temp> python --version
Python 3.13.2
I may be wrong, hence my question.
I am ok to correct things and reinstall modules and stuff in a corrected venv. But if I cannot control the python version exactly I will have to turn on a Windows box where I can do that easily.
I frankly would want to avoid that
It was created for this topic to test it again and show you what I got.
But, I used exactly what you did and I have exactly the same results you got … I will redo all my stuff using this kind of instruction and test again.
If it solves or not my issue, thanks a lot for the time and effort you dedicated to this.
Thank you for your response.
I thought about alias but didn’t go further because I figured that if Tumbleweed installs and updates Python it could be because it uses it in tool or process. Changing the expected version could bring other issue.
I feel like I remember there being a tool where you could pick which version of Python you want to use by default, but I can no longer find it on my system.