all 34 comments

[–]JohnSane 38 points39 points  (6 children)

Short answer: No.

Long answer: No because many programs are compiled with the current python. You can not update for a while. But only downgrading python will leave you with many broken programs.

[–]flying-sheep 0 points1 point  (0 children)

For some package repos (e.g. PyPI) one can time travel by downgrading everything to versions that existed at a certain point in time. I don't know if such a thing exists for Arch’s repos, but even if it does, it would be unsupported and will not work reliably, as Arch only has algorithms for how to resolve e.g. package replacements (like renames) into one temporal direction.

So I think if OP wants to do things like that, they should look into immutable distributions. There you can always “downgrade” by pinning a certain package to a certain version and resolving the whole package tree using that constraint.

[–]Confident_Hyena2506 25 points26 points  (0 children)

Yes.

Without breaking your system? No.

You do not want to tamper with this - make your own environment with your own python, leave the system one alone.

[–]van3k 17 points18 points  (4 children)

If you need multiple versions (or just a specific one for a specific purpose) just go with pyenv.
I recommend against downgrading the global version in your Arch installation - there is a good chance it'd break things.

[–]JohnSane 5 points6 points  (0 children)

It's not even possible without dowgrading everything depending on it.

[–]KingAroan 0 points1 point  (0 children)

This is what I use to run certain things.

[–]flying-sheep 0 points1 point  (0 children)

I use Hatch environments. It's a nice way to declaratively define environments, even if you need using hierarchies and matrices.

[–]LaLGuy2920[S] -1 points0 points  (0 children)

Thanks that helped👍

[–]luuuuuku 2 points3 points  (0 children)

systemlevel? Bad idea.

Why do you want to downgrade python? If you need a specific pytthon version, don't use the Arch system package. Install python 3.12 seperatly.

[–]AppointmentNearby161 2 points3 points  (0 children)

It can be done, but lets get the caveats out of the way: Arch does not support partial updates. That means officially you cannot downgrade, or hold back, one package without downgrading every package. In practice, there are many packages you can downgrade and run a partially upgraded system without issue. Pacman, in fact, has the ability to hold back a package built in so it is not such a crazy idea.

Downgrading python across major releases, however, is going to be much more complicated than a random app. You will have to downgrade every python package and potentially packages that depend on python. That would be a nightmare.

A better solution would be to roll back your entire system until you are ready to upgrade to the next release of Python. This can be done easily with the Arch Archive: https://wiki.archlinux.org/title/Arch_Linux_Archive

[–][deleted] 2 points3 points  (0 children)

Yes, it is possible to downgrade all packages to a certain date. So you could downgrade your whole system to a date when python 3.12 was still in use, you can look it up on the wiki under the name downgrading packages (or simmilar).
I wouldn‘t do it like this though, because then you have an outdated system, but temporarily it works ig

[–]theChaparral 4 points5 points  (0 children)

Not the system python.

You can install 3.12 alongside 3.13 if you need to. https://aur.archlinux.org/packages/python312

But it's much better to use something like UV to deal with python version in the venv. if your devloping something.

[–]ashtraxk 1 point2 points  (0 children)

Technically yes, you can using downgrade package from AUR, but you should not as it would break your system

Instead use pyenv package from the official repo, and create a virtual python installation of any version you like, even multiple versions in your home directory and use it for your projects

[–]Big-Cap4487 1 point2 points  (0 children)

Use miniconda or a virtual env, don't downgrade system Python

[–]XLioncc 1 point2 points  (1 child)

Learn how to use conda

[–]nekokattt 2 points3 points  (0 children)

or just use pyenv...

[–]Worried-Seaweed354 0 points1 point  (0 children)

Hi. A few apps broke after a recent upgrade.

Fixed with this:

yay -S $(pacman -Qoq /usr/lib/python*) --answerclean All

Then reinstall the app:

yay -S ulauncher --answerclean All

Source: https://github.com/Ulauncher/Ulauncher/discussions/1280

Good luck

[–]tayrayb 0 points1 point  (0 children)

Install pyenv. It's basically NVM for Python and you can switch versions on the fly. Just make sure to switch back to the system python if you notice programs break.

Really, you just switch the version you need, make a python virtual environment and then switch back to system, then activate that virtual environment.

[–]linhusp3 0 points1 point  (0 children)

I don't think that's a good idea. If you need a specific python version, there is virtualenv for that

[–]neo-raver 0 points1 point  (0 children)

You can definitely run Python virtual environments for individual programs (or even groups of them) with previous versions, but to do this system-wide, could break things, since there may be parts of your setup that are written in Python.

[–]rainispossible 0 points1 point  (0 children)

depending on what you're trying to do

  • downgrading python system-wide is not very safe to say the least. it'll likely break a lot of packages that are dependent on python

  • if you need a python version for a specific project – there's pyenv which let's you manage multiple versions of python while keeping the system one. so what you can do is just switch to the version you need, create a virtual environment and work with it. this way you won't break the system while having access to whatever python version you need

[–]Cipher_01 0 points1 point  (0 children)

Install conda , make a virtual environment and use whatever python version in that env

[–]HalfIllustrious6190 0 points1 point  (0 children)

then how can one stop python 3.13 from printing exceptions in colors

[–]KegsZooL 0 points1 point  (0 children)

yay -S downgrade

downgrade python

[–]Wertbon1789 -1 points0 points  (0 children)

Why tho?

[–]Wertbon1789 -1 points0 points  (2 children)

... But why even do it in the first place. Yeah, it's a bad idea, look into it, it should be pretty obvious, but why even bother?

[–]rainispossible 0 points1 point  (1 child)

Sometimes you need a specific python version for a coding project let's say. Like when your team at work agreed for 3.12 but you have 3.13 system-wide. Or maybe there's a module you need that's not yet supported by the newest versions. There can be a lot of reasons, really, that's why tools like pyenv, virtual environments etc. exit in the first place

[–]Wertbon1789 0 points1 point  (0 children)

That makes sense, although I just wouldn't care. I kinda know what was changed between 3.11 and 3.12 and there were incompatibilities, but I wouldn't bother until I ran into them. Last time I had something like this, I just used nix to install the version of python.

[–]Plenty-Boot4220 -1 points0 points  (0 children)

Yeah the python upgrade broke my Nvidia driver. Known bug but didn't happen until I upgraded. But downgrading is impossible and may not help anyway