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 ...
随机推荐
- python: 添加自定义模块路径 —— 可以使用相对路径
自定义模块时,添加模块路径: sys.path.append('..')
- QThread 采用moveToThread方式实现多线程。 线程本身、connect关联的槽函数、connect关联的lambda对象分别运行在哪个线程中。
Qt如何实现多线程:https://www.cnblogs.com/azbane/p/11372531.html September 5,2019 先抛出几个问题,用问题来引导思维导向: 1.继承的Q ...
- 20165313-bof进阶
实践基础知识 1.ALSR 1.定义: ASLR,全称为 Address Space Layout Randomization,地址空间布局随机化,它将进程的某些内存空间地址进行随机化来增大入侵者预测 ...
- 源码casino-server剖析(1)--游戏服务的整体架构和实现
前言: 最近研究了一些游戏服务器的架构和实现, github上找了几个开源的实现. 有几个感觉不错, 打算仔细研读一下. 游戏服务器种类繁多, 这边主要是基于状态同步的棋牌类游戏, 适合入门, ^_^ ...
- [转帖]美团在Redis上踩过的一些坑-5.redis cluster遇到的一些问题
美团在Redis上踩过的一些坑-5.redis cluster遇到的一些问题 博客分类: redis 运维 redis clustercluster-node-timeoutfailover 转载请 ...
- mysql启动报错 "unknown variable 'defaults-file=/etc/my.cnf"
使用指定的my.cnf,而不用默认的/etc/my.cnf文件,可以在启动时,在mysqld_safe后加上参数--default-file=/usr/local/server/mysql2/etc/ ...
- lua entry thread aborted: runtime error: /usr/../process.lua:448: attempt to concatenate field 'np_sum_duration' (a userdata value)
[1]问题场景原代码 引起问题的原代码,访问数据库,汇总数据后,使用汇总结果报异常: local function amount_sum_fee(cycleid) local select_produ ...
- 命令(Command)模式
命令模式又称为行动(Action)模式或者交易(Transaction)模式. 命令模式把一个请求或者操作封装到一个对象中.命令模式允许系统使用不同的请求把客户端参数化,对请求排队或者记录请求日志,可 ...
- 关于mysql的null相关查询的一些坑
我们先看一下效果,然后在解释,示例如下: mysql> create table test5 (a int not null,b int,c varchar(10)); Query OK, 0 ...
- java异常的嵌套和级联
一.分开捕获或者嵌套使用 我们先看看下面这段代码: public class Cal { public int div(int a, int b) { int result = a / b; retu ...