Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy
 

How to install gmpy via python pip




gmpy - GMP or MPIR interface to Python 2.4+ and 3.x, it belongs to Classifiers:

- Development Status :: 6 - Mature

When you know about this project and you want to new install gmpy to support your project or you get trouble as ModuleNotFoundError: No module named "gmpy" or ImportError: cannot import name "gmpy" in your project, let follow this tutorial to install gmpy



Installation:

Step 1: First, ensure you installed pip in your os, to check pip has been installed on your computer

In Windows (CMD):

py -m pip --version

In Unix/macOS:

python3 -m pip --version

Ensure pip, setuptools, and wheel are up to date:

In Windows (CMD):

py -m pip install --upgrade pip setuptools wheel

In Unix/macOS:

python3 -m pip install --upgrade pip setuptools wheel


Optional - If you want to install in virtual environment:

In Windows (CMD):

- Install virtualenv - if you installed it, please ignore

py -m pip install --user virtualenv

- Create a virtual environment

py -m venv test_gmpy_env

- Active the virtual environment

test_gmpy_env\Scripts\active

In Unix/macOS:

- Install virtualenv - if you installed it, please ignore

pip3 install virtualenv

- Create a virtual environment

python3 -m venv test_gmpy_env

- Active the virtual environment

source test_gmpy_env/bin/active


Step 2: OK, now, let flow below content to start the installation gmpy

To install gmpy on Windows(CMD):

py -m pip install gmpy

To install gmpy on Unix/macOs:

pip install gmpy


Step 3: If you want to install a specific gmpy version, add ==<gmpy version> to the end command line

Example:

pip install gmpy==1.02


Please see the version list below table:

VersionReleased dateCommand
gmpy 1.172013-07-28T04:07:44Windows:

py -m pip install gmpy==1.17

Unix/macOs:

pip install gmpy==1.17

gmpy 1.162012-10-13T00:28:20Windows:

py -m pip install gmpy==1.16

Unix/macOs:

pip install gmpy==1.16

gmpy 1.152012-01-13T06:50:19Windows:

py -m pip install gmpy==1.15

Unix/macOs:

pip install gmpy==1.15

gmpy 1.142011-06-14T04:40:20Windows:

py -m pip install gmpy==1.14

Unix/macOs:

pip install gmpy==1.14

gmpy 1.022007-02-20T06:06:12Windows:

py -m pip install gmpy==1.02

Unix/macOs:

pip install gmpy==1.02


Step 4: Otherwise, you can install gmpy from local archives:

Download the distribution file from gmpy-1.17.zip or the specific gmpy version in the below list of distribution

After that, install by command:

On Windows(CMD):

py -m pip install <path_to_gmpy_downloaded_file>

On Unix/macOs:

pip install <path_to_gmpy_downloaded_file>


List distribution:

- gmpy-1.15.zip
- gmpy-1.16.zip
- gmpy-1.17.zip


Project link:

- Homepage