Ubuntu I needed to install: apt-get install libgmp-dev apt-get install libmpfr-dev apt-get install libmpc-dev Then: pip3 install gmpy2