修复“警告:未找到GMP或MPIR库;不建立Crypto.PublickKey._fastmath“错误在Python 2.7与CentOS 6.4 [英] Fixing "warning: GMP or MPIR library not found; Not building Crypto.PublickKey._fastmath" error on Python 2.7 with CentOS 6.4
问题描述
我使用Python 2.7运行CentOS 6.4服务器(通过PythonBrew脚本安装)
I'm running a CentOS 6.4 server with Python 2.7 (installed via PythonBrew script)
我通过'yum install gmp'
安装了gmp python-devel安装通过'yum install python-devel'(但它是为python 2.6系列)
I have gmp installed via 'yum install gmp' and python-devel installed via 'yum install python-devel' (but it's for python 2.6 series)
我试图在我的服务器上安装pycrypto,
I'm trying to install pycrypto on my server, but it's giving me
warning: GMP or MPIR library not found; Not building Crypto.PublickKey._fastmath
有没有办法让pip识别我的gmp安装?
Is there any way to make pip 'recognize' my gmp installation?
感谢:D
推荐答案
使用pip在Centos 6.4的系统级别安装Fabric。 (Fabric使用pycrypto)。
I got the above error when trying to install Fabric at the system level on Centos 6.4 using pip. (Fabric uses pycrypto).
warning: GMP or MPIR library not found; Not building Crypto.PublickKey._fastmath
这是我的工作方式:
yum install gmp-devel
sudo pip uninstall ecdsa pycrypto paramiko fabric
# clear out the pip build dirs
rm -rf /tmp/pip-*
# make sure the directory containing libgmp.so.3 is on the python path
export LD_LIBRARY_PATH="/usr/lib64:$LD_LIBRARY_PATH"
pip install fabric
这篇关于修复“警告:未找到GMP或MPIR库;不建立Crypto.PublickKey._fastmath“错误在Python 2.7与CentOS 6.4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!