2

Follow this manual to upgrade fedora from 32 to 33. After reboot, when run dnf check-update, the following error occurred:

Traceback (most recent call last):
  File "/usr/bin/dnf", line 57, in <module>
    from dnf.cli import main
ModuleNotFoundError: No module named 'dnf'

Additional Information:

The output of command rpm -qa python3 is:

python3-3.9.1-2.fc33.x86_64
python3-3.8.7-2.fc32.x86_64

It seems that even after upgrade to fedora 33, old fedora 32 packages are still there. Run rpm -qa | sort proved that.

The output of command rpm -ql python3-3.8.7-2.fc32.x86_64 is:

/usr/bin/pydoc
/usr/bin/pydoc3
/usr/bin/pydoc3.8
/usr/bin/python3
/usr/bin/python3.8
/usr/lib/.build-id
/usr/lib/.build-id/da
/usr/lib/.build-id/da/2e3a5d2a850e1b6e560df11fa5d61a7192f954
/usr/share/doc/python3
/usr/share/doc/python3/README.rst
/usr/share/man/man1/python3.1.gz
/usr/share/man/man1/python3.8.1.gz

But the output of python3-3.8.7-2.fc33.x86_6 is:

error: open of python3-3.8.7-2.fc33.x86_64 failed: No such file or directory
aruku7230
  • 843
  • 8
  • 20
  • 2
    You probably will have more luck with this question on SuperUser or ServerFault – mousetail Mar 16 '21 at 14:58
  • Can you import `dnf` when running `python3.8`? E.g., `python3.8 -c "import dnf"`, as well as `python3.8 -c "import dnf.cli"`. – 9769953 Mar 16 '21 at 15:18
  • @mousetail. I realize that I should have posted it on ServerFault, but I cannot move it to ServerFault. So I voted to close and move it to ServerFault. – aruku7230 Mar 17 '21 at 01:01

0 Answers0