dnf broken after downgrading from python3.11 to python3.10 on Fedora 37 x86_64. It says
File "/usr/bin/dnf", line 61, in <module>
from dnf.cli import main
ModuleNotFoundError: No module named 'dnf'
Since I was previously using 3.11 I decided upgrading back to 3.11 would fix it, so I tried installing it from source and compiling it, then I made python3 and python symlinks in /usr/bin point to python3.11, now if I type python3 or python it works, but everything else doesn't. Also things like OpenSSL, though present on the system, are not seen by other tools as compiled. I also tried installing python 3.11 with pyenv, but it failed due to it not finding OpenSSL (but which openssl gives me /usr/bin/openssl).