运行结构时出现以下错误
(ENV)[root@server-124 ENV]# fab Traceback (most recent call last): File "/usr/bin/fab", line 9, inload_entry_point('Fabric==1.8.3', 'console_scripts', 'fab')() File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 299, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2229, in load_entry_point return ep.load() File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1948, in load entry = __import__(self.module_name, globals(),globals(), ['__name__']) File "/usr/lib/python2.6/site-packages/fabric/main.py", line 19, in from fabric import api, state, colors File "/usr/lib/python2.6/site-packages/fabric/api.py", line 9, in from fabric.context_managers import (cd, hide, settings, show, path, prefix, File "/usr/lib/python2.6/site-packages/fabric/context_managers.py", line 42, in from fabric.state import output, win32, connections, env File "/usr/lib/python2.6/site-packages/fabric/state.py", line 9, in from fabric.network import HostConnectionCache, ssh File "/usr/lib/python2.6/site-packages/fabric/network.py", line 24, in import paramiko as ssh File "/usr/lib/python2.6/site-packages/paramiko/__init__.py", line 31, in from transport import SecurityOptions, Transport File "/usr/lib/python2.6/site-packages/paramiko/transport.py", line 33, in from paramiko import util File "/usr/lib/python2.6/site-packages/paramiko/util.py", line 33, in from paramiko.common import * File "/usr/lib/python2.6/site-packages/paramiko/common.py", line 98, in from Crypto import Random File "/usr/lib64/python2.6/site-packages/Crypto/Random/__init__.py", line 29, in from Crypto.Random import _UserFriendlyRNG File "/usr/lib64/python2.6/site-packages/Crypto/Random/_UserFriendlyRNG.py", line 38, in from Crypto.Random.Fortuna import FortunaAccumulator File "/usr/lib64/python2.6/site-packages/Crypto/Random/Fortuna/FortunaAccumulator.py", line 39, in import FortunaGenerator File "/usr/lib64/python2.6/site-packages/Crypto/Random/Fortuna/FortunaGenerator.py", line 34, in from Crypto.Util.number import ceil_shift, exact_log2, exact_div File "/usr/lib64/python2.6/site-packages/Crypto/Util/number.py", line 56, in if _fastmath is not None and not _fastmath.HAVE_DECL_MPZ_POWM_SEC: AttributeError: 'module' object has no attribute 'HAVE_DECL_MPZ_POWM_SEC'
我已经提到了其他一些帖子,说它"所以你正在使用较新版本的PyCrypto和旧版本的_fastmath." 所以我也安装了gmp-devel
我使用的是virtualenv,Centos 6,Python 2.6
请帮忙.
这为我修好了:
pip install PyCrypto==2.3
我没有卸载,python-crypto
因为我需要的其他软件包依赖它.我只是运行上面的pip命令,一切正常:)