Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

redis server for windows with use for python3 [duplicate]

Tags:

python

redis

So i have a linux server that i use to run a program on, and i like to use windows to code on it as well. up until now i was using json to store and retrieve key,value information from text files. a friend told me to check out redis, so i installed it for python 3.3 using its installer. upon trying to use it, it gave the following error

raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 10061 connecting to localhost:6379. No connection could be made because the target machine actively refused it.

Now i was told after this that i needed to get a redis server, but so far the only options i have found are for linux. so the question being how could i get python working with redis on windows? i am completely new to database type storage so any help would be appreciated. also on another note if there is a question that was asked that dealt with using python with redis on windows then link that here. i could not find any other questions of this specific nature.

like image 366
user3723955 Avatar asked Jun 09 '14 21:06

user3723955


2 Answers

Here is a Windows port of Redis with a simple installer. Your redis client is attempting to connect to localhost:6379, but there's no redis-server running on that port. Once you install and run Redis locally, it should work.

Alternatively, you could run redis-server on your linux machine, and set the redis client you're using to connect to the linux machine by passing the ip of the linux machine in when you initialize your client.

Also, try reading the Redis Quickstart manual for more information

like image 101
wallacer Avatar answered Sep 23 '22 14:09

wallacer


You can run Redis on Windows, but it's unofficial. If you want to put this into a stable production environment, it would be better to install Redis on a Linux machine.

http://redis.io/download

You installed the Redis client software for connecting to a Redis database, but you actually need to install the database software and point your code at the database.

like image 32
Adam Avatar answered Sep 23 '22 14:09

Adam