Python does not support Redis by default, and an error will be reported when redis is referenced:
Here you need to install the Redis library for Python. After downloading https://github.com/andymccurdy/redis-py, unzip and install
Switch to the redis-py directory and find setup.py
Execute python setup.py install
Enter the python editor, you can import redis normally
## http: //www.bubuko.com/infodetail-3030095.html
或者 :
Solution:
·First download the compressed package zip at https://github.com/andymccurdy/redis-py and decompress it;
·Open the command window in the unzipped folder;
·Enter the command: python setup.py install;
`The installation is successful, Import redis into the python environment is normal.