This one gives better insight into the error itself.
Some developer thought it a good idea to provide a user-friendly warning about a potential security threat, but botched up the code that prints that warning.
I just replaced this:
# You need libgmp v5 or later to get mpz_powm_sec. Warn if it's not available.
if _fastmath is not None and not _fastmath.HAVE_DECL_MPZ_POWM_SEC:
_warn("Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.", PowmInsecureWarning)
with this:
# You need libgmp v5 or later to get mpz_powm_sec. Warn if it's not available.
if _fastmath is not None and not hasattr(_fastmath, 'HAVE_DECL_MPZ_POWM_SEC'):
_warn("Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.", PowmInsecureWarning)
in my /usr/lib64/python2.6/site-packages/Crypto/Util/number.py
It still can be done better, but if you don't care for the security threat, this will get you going.