Fixing quot;warning: GMP or MPIR library not found; Not building Crypto.PublickKey._fastmathquot; error on Python 2.7 with CentOS 6.4(修复“警告:未找到 GMP 或 MPIR 库;不构建 Crypto.PublickKey._fastmathCentOS 6.4 上的 Python 2.7 错误)
问题描述
我正在使用 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 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:修复“警告:未找到 GMP 或 MPIR 库;不构建 Crypto.PublickKey._fastmath"CentOS 6.4 上的 Python 2.7 错误
基础教程推荐
- kivy 应用程序中的一个简单网页作为小部件 2022-01-01
- 对多索引数据帧的列进行排序 2022-01-01
- 在 Python 中将货币解析为数字 2022-01-01
- matplotlib 设置 yaxis 标签大小 2022-01-01
- Python,确定字符串是否应转换为 Int 或 Float 2022-01-01
- Kivy 使用 opencv.调整图像大小 2022-01-01
- 在 Django Admin 中使用内联 OneToOneField 2022-01-01
- Python 中是否有任何支持将长字符串转储为块文字或折叠块的 yaml 库? 2022-01-01
- 究竟什么是“容器"?在蟒蛇?(以及所有的 python 容器类型是什么?) 2022-01-01
- 比较两个文本文件以找出差异并将它们输出到新的文本文件 2022-01-01
