How To Install python3-gmpy2 on Fedora 36

In this tutorial we learn how to install python3-gmpy2 in Fedora 36. python3-gmpy2 is Python 3 interface to GMP, MPFR, and MPC

Introduction

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

What is python3-gmpy2

This package contains a C-coded Python extension module that supports multiple-precision arithmetic. It is the successor to the original gmpy module. The gmpy module only supported the GMP multiple-precision library. Gmpy2 adds support for the MPFR (correctly rounded real floating-point arithmetic) and MPC (correctly rounded complex floating-point arithmetic) libraries. It also updates the API and naming conventions to be more consistent and support the additional functionality.

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

Install python3-gmpy2 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-gmpy2 using dnf by running the following command:

sudo dnf -y install python3-gmpy2

Install python3-gmpy2 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-gmpy2 using yum by running the following command:

sudo yum -y install python3-gmpy2

How To Uninstall python3-gmpy2 on Fedora 36

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

sudo dnf remove python3-gmpy2

python3-gmpy2 Package Contents on Fedora 36

/usr/lib/.build-id
/usr/lib/.build-id/28
/usr/lib/.build-id/28/76d77f3c1a514d2ce475d7843542f146a40266
/usr/lib64/python3.10/site-packages/gmpy2
/usr/lib64/python3.10/site-packages/gmpy2-2.1.2.dist-info
/usr/lib64/python3.10/site-packages/gmpy2-2.1.2.dist-info/COPYING
/usr/lib64/python3.10/site-packages/gmpy2-2.1.2.dist-info/COPYING.LESSER
/usr/lib64/python3.10/site-packages/gmpy2-2.1.2.dist-info/INSTALLER
/usr/lib64/python3.10/site-packages/gmpy2-2.1.2.dist-info/METADATA
/usr/lib64/python3.10/site-packages/gmpy2-2.1.2.dist-info/WHEEL
/usr/lib64/python3.10/site-packages/gmpy2-2.1.2.dist-info/top_level.txt
/usr/lib64/python3.10/site-packages/gmpy2/__init__.pxd
/usr/lib64/python3.10/site-packages/gmpy2/__init__.py
/usr/lib64/python3.10/site-packages/gmpy2/__pycache__
/usr/lib64/python3.10/site-packages/gmpy2/__pycache__/__init__.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/gmpy2/__pycache__/__init__.cpython-310.pyc
/usr/lib64/python3.10/site-packages/gmpy2/gmpy2.cpython-310-x86_64-linux-gnu.so
/usr/lib64/python3.10/site-packages/gmpy2/gmpy2.h
/usr/lib64/python3.10/site-packages/gmpy2/gmpy2.pxd
/usr/share/licenses/python-gmpy2
/usr/share/licenses/python-gmpy2/COPYING
/usr/share/licenses/python-gmpy2/COPYING.LESSER

References

Summary

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