How To Install python3-modernize on Fedora 36

In this tutorial we learn how to install python3-modernize in Fedora 36. python3-modernize is Modernizes Python code for eventual Python 3 migration

Introduction

In this tutorial we learn how to install python3-modernize on Fedora 36.

What is python3-modernize

This library is a very thin wrapper around lib2to3 to utilize it to make Python 2 code more modern with the intention of eventually porting it over to Python 3. It attempts, but does not guarantee, to generate a Python 2/3 compatible codebase. The code that it generates needs python2.6+ and has a runtime dependency on python-six.

We can use yum or dnf to install python3-modernize on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install python3-modernize.

Install python3-modernize on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install python3-modernize using dnf by running the following command:

sudo dnf -y install python3-modernize

Install python3-modernize on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install python3-modernize using yum by running the following command:

sudo yum -y install python3-modernize

How To Uninstall python3-modernize on Fedora 36

To uninstall only the python3-modernize package we can use the following command:

sudo dnf remove python3-modernize

python3-modernize Package Contents on Fedora 36

/usr/bin/modernize
/usr/bin/python-modernize
/usr/lib/python3.10/site-packages/__pycache__/modernize.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/__pycache__/modernize.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize
/usr/lib/python3.10/site-packages/libmodernize/__init__.py
/usr/lib/python3.10/site-packages/libmodernize/__pycache__
/usr/lib/python3.10/site-packages/libmodernize/__pycache__/__init__.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/__pycache__/__init__.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/__pycache__/main.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/__pycache__/main.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes
/usr/lib/python3.10/site-packages/libmodernize/fixes/__init__.py
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/__init__.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/__init__.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_basestring.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_basestring.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_classic_division.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_classic_division.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_dict_six.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_dict_six.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_file.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_file.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_filter.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_filter.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_import.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_import.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_imports_six.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_imports_six.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_input_six.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_input_six.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_int_long_tuple.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_int_long_tuple.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_itertools_imports_six.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_itertools_imports_six.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_itertools_six.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_itertools_six.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_map.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_map.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_metaclass.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_metaclass.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_next.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_next.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_open.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_open.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_print.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_print.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_raise.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_raise.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_raise_six.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_raise_six.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_unichr.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_unichr.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_unicode.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_unicode.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_unicode_future.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_unicode_future.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_unicode_type.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_unicode_type.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_urllib_six.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_urllib_six.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_xrange_six.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_xrange_six.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_zip.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/__pycache__/fix_zip.cpython-310.pyc
/usr/lib/python3.10/site-packages/libmodernize/fixes/fix_basestring.py
/usr/lib/python3.10/site-packages/libmodernize/fixes/fix_classic_division.py
/usr/lib/python3.10/site-packages/libmodernize/fixes/fix_dict_six.py
/usr/lib/python3.10/site-packages/libmodernize/fixes/fix_file.py
/usr/lib/python3.10/site-packages/libmodernize/fixes/fix_filter.py
/usr/lib/python3.10/site-packages/libmodernize/fixes/fix_import.py
/usr/lib/python3.10/site-packages/libmodernize/fixes/fix_imports_six.py
/usr/lib/python3.10/site-packages/libmodernize/fixes/fix_input_six.py
/usr/lib/python3.10/site-packages/libmodernize/fixes/fix_int_long_tuple.py
/usr/lib/python3.10/site-packages/libmodernize/fixes/fix_itertools_imports_six.py
/usr/lib/python3.10/site-packages/libmodernize/fixes/fix_itertools_six.py
/usr/lib/python3.10/site-packages/libmodernize/fixes/fix_map.py
/usr/lib/python3.10/site-packages/libmodernize/fixes/fix_metaclass.py
/usr/lib/python3.10/site-packages/libmodernize/fixes/fix_next.py
/usr/lib/python3.10/site-packages/libmodernize/fixes/fix_open.py
/usr/lib/python3.10/site-packages/libmodernize/fixes/fix_print.py
/usr/lib/python3.10/site-packages/libmodernize/fixes/fix_raise.py
/usr/lib/python3.10/site-packages/libmodernize/fixes/fix_raise_six.py
/usr/lib/python3.10/site-packages/libmodernize/fixes/fix_unichr.py
/usr/lib/python3.10/site-packages/libmodernize/fixes/fix_unicode.py
/usr/lib/python3.10/site-packages/libmodernize/fixes/fix_unicode_future.py
/usr/lib/python3.10/site-packages/libmodernize/fixes/fix_unicode_type.py
/usr/lib/python3.10/site-packages/libmodernize/fixes/fix_urllib_six.py
/usr/lib/python3.10/site-packages/libmodernize/fixes/fix_xrange_six.py
/usr/lib/python3.10/site-packages/libmodernize/fixes/fix_zip.py
/usr/lib/python3.10/site-packages/libmodernize/main.py
/usr/lib/python3.10/site-packages/modernize-0.8.0-py3.10.egg-info
/usr/lib/python3.10/site-packages/modernize-0.8.0-py3.10.egg-info/PKG-INFO
/usr/lib/python3.10/site-packages/modernize-0.8.0-py3.10.egg-info/SOURCES.txt
/usr/lib/python3.10/site-packages/modernize-0.8.0-py3.10.egg-info/dependency_links.txt
/usr/lib/python3.10/site-packages/modernize-0.8.0-py3.10.egg-info/entry_points.txt
/usr/lib/python3.10/site-packages/modernize-0.8.0-py3.10.egg-info/not-zip-safe
/usr/lib/python3.10/site-packages/modernize-0.8.0-py3.10.egg-info/requires.txt
/usr/lib/python3.10/site-packages/modernize-0.8.0-py3.10.egg-info/top_level.txt
/usr/lib/python3.10/site-packages/modernize.py
/usr/share/doc/python3-modernize
/usr/share/doc/python3-modernize/README.rst

References

Summary

In this tutorial we learn how to install python3-modernize on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).