解决使用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://i3.wp.com/i-blog.csdnimg.cn/direct/d45fe03bfe8f4f5a947f9c6f8bdf0ce8.png
然后将右侧的包管理器内的Paramiko和cryptography选中,点击上侧的-符号,删除当前版本。
然后重新点击+符号,手动指定版本号安装。
Paramiko版本为3.0.0 cryptography版本为36.0.2亲测可用不报任何上述错误。
作者:Passerby90368