''cryptography' package is required for sha256_password or caching_sha2_password auth methods
Request Method: POST
Request URL: http://192.168.0.110/admin/login/?next=/admin/
Django Version: 4.0.1
Exception Type: RuntimeError
Exception Value:
'cryptography' package is required for sha256_password or caching_sha2_password auth methods
Exception Location: /home/chickoos/explab/ExpLab/venv/lib/python3.8/site-packages/pymysql/_auth.py, line 143, in sha2_rsa_encrypt
Python Executable: /home/chickoos/explab/ExpLab/venv/bin/python
Python Version: 3.8.10
Python Path:
['/home/chickoos/explab/ExpLab',
'/usr/lib/python38.zip',
'/usr/lib/python3.8',
'/usr/lib/python3.8/lib-dynload',
'/home/chickoos/explab/ExpLab/venv/lib/python3.8/site-packages']
Server time:
Solution 1:[1]
To use “sha256_password” or “caching_sha2_password” for authenticate, you need to install additional dependency:
$ python3 -m pip install PyMySQL[rsa]
According to official documentation: https://pymysql.readthedocs.io/en/latest/user/installation.html
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | akpp |