Replying to the list since I have absolutely no idea about gmpy2 or pip...
On 01/11/2018 16:56, jacob m wrote:
> Hi Rodhri, of course I can paste the text :)
> "
> creating build
> creating build/temp.linux-x86_64-3.7
> creating build/temp.linux-x86_64-3.7/src
> gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3
> -Wall -fPIC -DWITHMPFR -DWITHMPC -I/home/lib/python3.7/include/python3.7m
> -c src/gmpy2.c -o build/temp.linux-x86_64-3.7/src/gmpy2.o
> In file included from src/gmpy2.c:426:0:
> src/gmpy.h:106:12: fatal error: gmp.h: No such file or directory
> # include "gmp.h"
> ^~~~~~~
> compilation terminated.
> error: command 'gcc' failed with exit status 1
>
> ----------------------------------------
> Command "/home/lib/python3.7/bin/python3.7 -u -c "import setuptools,
> tokenize;__file__='/tmp/pip-install-kiqba_j_/gmpy2/setup.py';f=getattr(tokenize,
> 'open', open)(__file__);code=f.read().replace('\r\n',
> '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record
> /tmp/pip-record-2jatj1mi/install-record.txt
> --single-version-externally-managed --compile" failed with error code 1 in
> /tmp/pip-install-kiqba_j_/gmpy2/
> "
A little googling suggests that you need to install the libgmp3-dev package:
$ sudo apt install libgmp3-dev