flask:报错:RuntimeError: 'cryptography' package is required for sha256_password or caching_sha2_password auth methods

一,报错信息:

RuntimeError: 'cryptography' package is required for sha256_password or caching_sha2_password auth methods

 

二,解决:

原因是缺少cryptography库,导致建立到mysql的连接时出错

$ pip3 install cryptography

重启flask后恢复正常 

posted @ 2025-11-09 10:04  刘宏缔的架构森林  阅读(59)  评论(0)    收藏  举报