.. _spkg_gmpy2:

gmpy2: Python interface to GMP/MPIR, MPFR, and MPC
==================================================

Description
-----------

GMP/MPIR, MPFR, and MPC interface to Python 2.6+ and 3.x

gmpy2 is a C-coded Python extension module that supports
multiple-precision arithmetic. In addition to supporting GMP or MPIR for
multiple-precision integer and rational arithmetic, gmpy2 adds support
for the MPFR (correctly rounded real floating-point arithmetic) and MPC
(correctly rounded complex floating-point arithmetic) libraries.

Type
----

standard


Version Information
-------------------

package-version.txt::

    2.1.0b5

install-requires.txt::

    # We would like to write gmpy2 >=2.1.0b5, but pipenv does not accept prereleases in version ranges
    # https://github.com/pypa/pipenv/issues/1760
    gmpy2 ==2.1.0b5


Equivalent System Packages
--------------------------

conda:

.. CODE-BLOCK:: bash

    $ conda install python:gmpy2 python:gmpy2-devel

macports:
install the following packages: python:gmpy2 python:gmpy2-devel
See https://repology.org/project/python:gmpy2/versions, https://repology.org/project/python:gmpy2-devel/versions

However, these system packages will not be used for building Sage
because using Python site-packages is not supported by the Sage distribution;
see https://trac.sagemath.org/ticket/29023

