修复“警告:未找到 GMP 或 MPIR 库;不构建 Crypto.PublickKey._fastmath"

2023-04-16Python开发问题
992

本文介绍了修复“警告:未找到 GMP 或 MPIR 库;不构建 Crypto.PublickKey._fastmath"CentOS 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 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

在xarray中按单个维度的多个坐标分组
groupby multiple coords along a single dimension in xarray(在xarray中按单个维度的多个坐标分组)...
2024-08-22 Python开发问题
15

Pandas中的GROUP BY AND SUM不丢失列
Group by and Sum in Pandas without losing columns(Pandas中的GROUP BY AND SUM不丢失列)...
2024-08-22 Python开发问题
17

GROUP BY+新列+基于条件的前一行抓取值
Group by + New Column + Grab value former row based on conditionals(GROUP BY+新列+基于条件的前一行抓取值)...
2024-08-22 Python开发问题
18

PANDA中的Groupby算法和插值算法
Groupby and interpolate in Pandas(PANDA中的Groupby算法和插值算法)...
2024-08-22 Python开发问题
11

PANAS-基于列对行进行分组,并将NaN替换为非空值
Pandas - Group Rows based on a column and replace NaN with non-null values(PANAS-基于列对行进行分组,并将NaN替换为非空值)...
2024-08-22 Python开发问题
10

按10分钟间隔对 pandas 数据帧进行分组
Grouping pandas DataFrame by 10 minute intervals(按10分钟间隔对 pandas 数据帧进行分组)...
2024-08-22 Python开发问题
11