問題描述
我正在使用 Python 2.7(通過 PythonBrew 腳本安裝)運行 CentOS 6.4 服務器
I'm running a CentOS 6.4 server with Python 2.7 (installed via PythonBrew script)
我通過 'yum install gmp' 安裝了 gmp和通過'yum install python-devel'安裝的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
推薦答案
我在 Centos 6.4 上嘗試使用 pip 在系統級別安裝 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"CentOS 6.4 上的 Python 2.7 錯誤的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!