For Redis, we need to use the redis-py library to interact with it. Here's how to install it.
1. Related Links
- GitHub:https://github.com/andymccurdy/redis-py
- Official documentation: https://redis-py.readthedocs.io/
2. pip install
It is recommended to use pip to install, the command is as follows:
pip3 install redis
After running, you can complete the installation of redis-py.
3. Verify the installation
In order to verify that the redis-py library has been installed successfully, you can test it on the command line:
$ python3
>>> import redis
>>> redis.VERSION
(2, 10, 5)
>>>
If its version content is successfully output, it proves that redis-py was successfully installed.