PyEZ: 'EntryPoint' 对象没有属性 'resolve'

PyEZ: 'EntryPoint' object has no attribute 'resolve'

PyEZ 用户面临主题行错误的问题

from jnpr.junos import Device
>>> dev = Device(host='xxx',user='xxxx',passwd='xxx')
>>> dev.open()
No handlers could be found for logger "ncclient.transport.ssh"
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.7/site-packages/jnpr/junos/device.py", line 483, in open
    raise cnx_err
jnpr.junos.exception.ConnectError: ConnectError(host: esc-elit-01.dcbg.juniper.net, msg: 'EntryPoint' object has no attribute 'resolve') 

使用以下命令安装密码学 1.2.1

sudo pip install cryptography==1.2.1

或升级分发

sudo pip install -U distribute

参考:

https://github.com/mozilla/sops/issues/67

https://github.com/ARMmbed/yotta/issues/764

"python-pip" 软件包安装了与密码学版本 >= 1.3 不兼容的旧版本 distribute/setuptools。

加密库指定对 setuptools >= 11.3 的依赖: https://github.com/pyca/cryptography/blob/master/setup.py#L40

但是,这个要求没有得到满足,因为 setuptools 是由 OS 的打包系统而不是 pip 安装的。当 pip 尝试升级 setuptools 时,升级失败(但不会导致密码安装实际失败。)

运行:

sudo pip install -U distribute

强制升级 setuptools(分发包在以后的版本中已重命名为 setuptools)。你也可以这样做:

sudo pip install -U setuptools