Unable to import gmpy

I am a beginner with ubuntu and python. As I try to import gmpy, I get the following error:

import gmpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: libgmp.so.3: cannot open shared object file: No such file or directory

Any and all help would be appreciated, thanks

Answer

libgmp.so.3 is only available for 12.04, it’s part of the libgmp3c2 package.

If you’re running Ubuntu 12.04, try to install the missing package:

sudo apt-get install libgmp3c2

Note: As of 14.04, installing python-gmpy from Ubuntu repositories will automatically install libgmp-dev which provides libgmp.so.10.

Attribution
Source : Link , Question Author : Anindya Mitra , Answer Author : Sylvain Pineau

Leave a Comment