错误:
File "/py3/lib/python3.6/site-packages/redis/client.py", line 747, in flushdb
return self.execute_command('FLUSHDB')
File "/py3/lib/python3.6/site-packages/redis/client.py", line 673, in execute_command
connection.send_command(*args)
File "/py3/lib/python3.6/site-packages/redis/connection.py", line 610, in send_command
self.send_packed_command(self.pack_command(*args))
File "/py3/lib/python3.6/site-packages/redis/connection.py", line 585, in send_packed_command
self.connect()
File "/py3/lib/python3.6/site-packages/redis/connection.py", line 489, in connect
raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 111 connecting to 127.0.0.1:6379. Connection refused.
解决方法:
sudo apt-get install redis-server
完毕!