How do I use old version of python?

I need old version of python, because some packages doesn’t work on new one…

How do I do so?

Use pyenv.


Packages? Like AUR packages? They need to be rebuilt against the new python.

Speaking of which, old pthon is also in the AUR if you need it (ex: python310).

(note … dont take that as an invitation to replace current python … not a good idea)

1 Like

Not AUR packages, the PIP packages is telling me it needs version lower than 3.11

It’s on AUR, but my pacman can’t find it? Which repo should I add and won’t it break my system?

Maybe using yay, but I’m not very experienced in it… However I could build and make from github, by make pkg, but I don’t know if it won’t break my system.

Reevaluate if you really, really need outdated software on you system.

Some heavy and complex projects (especially specialized standalone apps) simply can’t upgrade their tools and frameworks because the cost (both technical and money) is high with the introduction of not wanted bugs. If it works and gives correct calculations and results, it’s a good sign, because security is considered a major threat only for online apps.

I worked on a project that belongs to an aircraft manufacturer, it still uses .NET Framework 2.0, and any simple product request from the client involves many reviews and feedbacks from aeronautical engineers that push their answers to another French company that translates those answers to simple and comprehensible requests to be understood by us. And after any completed small change, the hell of automatic and manual testing starts again by another cell specialized in testing, to be finished with another round of integration and production testing by the client.

That is exactly why such projects are not done with rolling release distributions.

On the original question of the topic: use venv or pipx.

1 Like

Now I have it working,

I used pyenv along with venv and it runs smoothly nows.

Thank you.


Okey, I now have installed Python3.10 with pyenv, everything is all right, but I have too high version of CUDA on system for that. I would like to work with CUDA, therefore I need somehow packages that would be in /usr/lib/python3.10, now I have there only /usr/lib/python3.11 which is all right and expected, but not really much solving CUDA part of my problem.

How can I have Python3.10 system packages like tensorflow with proper cuda?

You have to install all the stuff you will possibly need in the virtual environment. That is the point. If you wanted to use the same version, you could have linked some stuff from the system libraries, but you want to use older version, so everything has to be done and installed from scratch in the venv.
There is no was way to install OLD libraries in the system without breaking it badly.

pacman does not interact with the AUR.
To rebuild your aur packages with current python you must rebuild them.
Do it manually, or use an AUR helper.

paru -S $(pacman -Qmq)

Or, lets say I have ‘python-aur-package’ that was built with python 10 but now I have python 11 … then

paru -S python-aur-package

(some aur helpers also have explicit rebuild flags, and some like yay wont rebuild if the cache exists)

…but it seems you are going the route of having deprecated python packages … but using a virtual environment. This is fine, and the way you should do it if you plan on having development python things outside of the system.

Short answer: You can’t, use docker with the nvidia base images for this.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.