使用Paramiko出现CryptographyDeprecationWarning的解决方法

在Pycharm中使用Paramiko,运行代码出现报错信息~\Python\Lib\site-packages\paramiko\pkey.py:100 : CryptographyDeprecationWarning:TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0. “cipher”: algorithms.TripleDES
以及
~\Python\Lib\site-packages\paramiko\transport.py:258: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0. “class”: algorithms.TripleDES,
报错内容时,请在Pycharm的设置(快捷键Ctrl+Alt+S)中找到Project:项目名称,
![在这里插入图片描述](https://i-blog.csdnimg.cn/direct/d45fe03bfe8f4f5a947f9c6f8bdf0ce8.png在这里插入图片描述
然后将右侧的包管理器内的Paramiko和cryptography选中,点击上侧的-符号,删除当前版本。
在这里插入图片描述
然后重新点击+符号,手动指定版本号安装。
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
Paramiko版本为3.0.0 cryptography版本为36.0.2亲测可用不报任何上述错误。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值