Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

gmpy2 problem

232 views
Skip to first unread message

jacob m

unread,
Nov 1, 2018, 10:40:34 AM11/1/18
to
Hi guys
I have some problems with gmpy2 module installation - pip install gmpy2
doesn't work for me
[image: image.png]

How to fix it?
Regards

Rhodri James

unread,
Nov 1, 2018, 11:44:00 AM11/1/18
to
Hi Jacob,

I'm afraid the screen-shot that you sent was automatically stripped off
by the mailing list. Could you copy the error text (preferably
cut-and-paste the whole thing rather than retyping!)? The more
information you can give us, the better the advice will be from the
people who actually understand pip :-)

--
Rhodri James *-* Kynesim Ltd

Rhodri James

unread,
Nov 1, 2018, 1:42:14 PM11/1/18
to
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

jacob m

unread,
Nov 5, 2018, 7:12:08 AM11/5/18
to
Sorry Rhodri, my gmail set your email as default recipient when I was
responding, I forgot to change that. Sorry for that
Regards

On Mon, 5 Nov 2018 at 13:06, Rhodri James <rho...@kynesim.co.uk> wrote:

> Jacob, please reply to the list, not to me personally. As I said, I
> have no idea about gmpy2 or pip, I just know how to google.
>
> On 01/11/2018 23:28, jacob m wrote:
> > I tried to install libgmp3-dev, but it didn't solved my problem
> >> --
> >> https://mail.python.org/mailman/listinfo/python-list

Rhodri James

unread,
Nov 5, 2018, 7:13:21 AM11/5/18
to
0 new messages