数据库 Python 发展

[Python+MySQL] RuntimeError: cryptography is required

2019-02-24

Share this for your friends.

[Python+MySQL] RuntimeError: cryptography is required

RuntimeError: cryptography is required for sha256_password or caching_sha2_password

有一天,我来到了这个错误,当您尝试从Python的连接到MySQL。
这次我们介绍的这款cryptography is required


什么错误?

密码是required是和翻译“是必需的** **加密”。

用什么来登录并说如何加密密码** **。
如果你使用ha256_password or caching_sha2_password连接到MySQL密码是不是说白了加密。

顺便说一句,如果你是从Windows任务管理器的Python程序经常运行,这cryptography is required by(为0x1),因为错误这里还产生谨慎。


错误的解决方案

原因出现错误Python的加密库短缺
这解决了通过添加加密库用下面的命令。

pip install cryptography

参考
需要加密时提高错误消息的乐于助人·问题#768·PyMySQL / PyMySQL·GitHub的


在Windows环境中的注意事项

拒绝访问错误是由Python的在Windows环境下的安装文件夹中生成。
尽量不要被拒绝访问,当您启动命令提示符,然后选择“以管理员身份运行”。

右键 - >以管理员身份运行



Share this for your friends.

If you felt this article is useful, please share.

にほんブログ村 IT技術ブログへ

-数据库, Python, 发展
-, ,

© 2024 ITips