Python paramiko安装报错
报错:CryptographyDeprecationWarning
代码引用:
import paramiko
client = paramiko.SSHClient()
client.connect(serverIp, port=serverPort, username=serverUser)
报警告如下:
paramiko\ecdsakey.py:164: CryptographyDeprecationWarning: Support for unsafe construction of public numbers from encoded data will be removed in a future version. Please use EllipticCurvePublicKey.from_encoded_point
self.ecdsa_curve.curve_class(), pointinfo
paramiko\kex_ecdh_nist.py:39: CryptographyDeprecationWarning: encode_point has been deprecated on EllipticCurvePublicNumbers and will be removed in a future version. Please use EllipticCurvePublicKey.public_bytes to obtain both compressed and uncompressed point encoding.
m.add_string(self.Q_C.public_numbers().encode_point())
paramiko\kex_ecdh_nist.py:96: CryptographyDeprecationWarning: Support for unsafe construction of public numbers from encoded data will be removed in a future version. Please use EllipticCurvePublicKey.from_encoded_point
self.curve, Q_S_bytes
paramiko\kex_ecdh_nist.py:111: CryptographyDeprecationWarning: encode_point has been deprecated on EllipticCurvePublicNumbers and will be removed in a future version. Please use EllipticCurvePublicKey.public_bytes to obtain both compressed and uncompressed point encoding.
hm.add_string(self.Q_C.public_numbers().encode_point())
原因
paramiko 2.4.2 依赖 cryptography,而最新的cryptography==2.5里有一些弃用的API。
解决
删掉cryptography 2.5,安装2.4.2,就不会报错了。
pip uninstall cryptography==2.5
pip install cryptography==2.4.2
补充
paramiko的issue #1369提到了这个问题,并已有PR #1379了,尚未合并。
Python paramiko安装报错的更多相关文章
- Python——pip安装报错:is not a supported wheel on this platform
pip安装报错:is not a supported wheel on this platform 可能的原因1:安装的不是对应python版本的库,下载的库名中cp35代表python3.5,其它同 ...
- python 首次安装 报错
最近python很火,想在空余时间学习一波,但是安装完Python后运行发现居然报错了,错误代码是0xc000007b,于是通过往上查找发现是因为首次安装Python缺乏VC++库的原因 错误提示如下 ...
- python模块安装报错大全
报错 环境 解决 手动安装pip install mysqlclient 报错: _mysql.c(29) : fatal error C1083: Cannot open include file: ...
- python pip安装报错python setup.py egg_info failed with error code 1
安装locust遇到点问题折腾了好一会儿,记录一下. 使用命令pip install locustio提示python setup.py egg_info failed with error cod ...
- python Twisted安装报错
系统 mac pro 错误信息: IOError: [Errno 63] File name too long: '/var/folders/72/byjy11cs0dj_z3rjtxnj_nn000 ...
- python模块安装报错 :error: command 'gcc' failed with exit status 1
参考:http://blog.csdn.net/fenglifeng1987/article/details/38057193 解决方法 yum install gcc libffi-devel py ...
- python pip安装报错: ConnectTimeoutError
错误: 解决方案: 使用镜像:pip install xxxx -i https://pypi.douban.com/simple 如:pip3 install --upgrade tensorf ...
- 使用pip安装报错的处理方法
在新的机子上使用pip安装程序一直报错: Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connect ...
- Scrapy安装报错
python3 pip 安装Scrapy在win10 安装报错error: Microsoft Visual C++ 14.0 is required. Get it with "Micro ...
随机推荐
- 三天精通Vue教程
在这里更新作为后端工程师想要快速掌握Vue需要看的重点内容,三天精通教程,加油! 学前摘要 ES6的常用语法 Vue的常用语法
- sql语句练习50题(Mysql版) 围观
表名和字段 –.学生表 Student(s_id,s_name,s_birth,s_sex) –学生编号,学生姓名, 出生年月,学生性别 –.课程表 Course(c_id,c_name,t_id) ...
- Spring Boot 知识笔记(Filter过滤器)
Filter也称之为过滤器,它是Servlet技术中最激动人心的技术,WEB开发人员通过Filter技术,对web服务器管理的所有web资源:例如Jsp, Servlet, 静态图片文件或静态 htm ...
- react + node + express + ant + mongodb 的简洁兼时尚的博客网站
前言 此项目是用于构建博客网站的,由三部分组成,包含前台展示.管理后台和后端. 此项目是基于 react + node + express + ant + mongodb 的,项目已经开源,项目地址在 ...
- 使用Redis搭建电商秒杀系统
背景 秒杀活动是绝大部分电商选择的低价促销.推广品牌的方式.不仅可以给平台带来用户量,还可以提高平台知名度.一个好的秒杀系统,可以提高平台系统的稳定性和公平性,获得更好的用户体验,提升平台的口碑,从而 ...
- Java查询MySQL数据库指定数据库中所有表名、字段名、字段类型、字段长度、字段描述
1,查询方法 public static List<Map<String, String>> getColumnInfoByTableName(String databaseN ...
- JNA 调用操作系统函数 和 系统调用
linux系统调用syscall 表:https://filippo.io/linux-syscall-table/ Linux Namespace 特性简要介绍 原文:https://iliangq ...
- elasticsearch 常用命令 一直红色 重启不稳定 不停的宕机
persistent (重启后设置也会存在) or transient (整个集群重启后会消失的设置). 查看集群状态和每个indices状态.搜索到red的,没用就删除 GET /_cluster/ ...
- 《Linux就该这么学》培训笔记_ch08_iptables与firewall防火墙
<Linux就该这么学>培训笔记_ch08_iptables与firewall防火墙 文章最后会post上书本的笔记照片. 文章主要内容: 防火墙管理工具 iptables firewal ...
- python cython c 性能对比
我们用以下方法计算百万以上float型数据的标准偏差,以估计各个方法的计算性能: 原始python numpy cython c(由cython调用) python 原始方法: # File: Std ...