需要的依赖库 gmp mpfr mpc

gmp 库安装

sudo apt-get install libgmp-dev


mpfr 库安装

sudo apt-get install libmpfr-dev


mpc 库安装

sudo apt-get install libmpc-dev


gmpy2 安装

sudo pip3 install gmpy2
#或者
sudo pip install gmpy2


Successfully installed gmpy2

Ubuntu 安装gmpy2模块_Linux

导入gmpy2模块success

Ubuntu 安装gmpy2模块_Linux_02