After downloading python 3.10 and being stupid by trying to set the version of the Python of my machine to Python 3.10 I broke both dnf and yum. I realized now I should of used a vritual environment instead. My machine is currently based in Fedora 34 workstation edition. Here is the error message every time I type yum or dnf in the command line:
Traceback (most recent call last):
File "/usr/bin/yum", line 57, in <module>
from dnf.cli import main
ModuleNotFoundError: No module named 'dnf'
At the moment, the dnf python package cannot be found. This can be for a number of reasons—from the files having being deleted to your default python version having been changed.
Sure, but did you follow all of that or specific bits? What versions of Python did you tweak? Did you use the “alternatives”? Did you install more packages using pip after you made your changes?
Basically the more information we have over what was done, the more chances we have of undoing it.
For example, can you go over your shell history to see what commands you ran? history in a terminal? Can we also have the output of python --version, and the output of fpaste --printonly --sysinfo please?
Yea, l learned the hard way. I’ve upgraded my machine before and I have my home folder on a partition so installation should not cause any problems. For the virtual environment I am going with poetry and pyenv. I have been using both for some time and they get the job done perfectly.