2015-09-14 54 views
1

我已經在我的virutalenv 'djangoscrape'中安裝了celeryredis使用pip install redis celery。打字redis-server-bash: redis-server: command not found.請問我做錯了什麼?如何讓redis服務器在virtualenv下爲mac用戶工作?

而且打字:

/Users/Me/.virtualenvs/djangoscrape/bin/celery --app = scraper.celery_tasks:應用工人--loglevel = INFO

結果:

-------------- [email protected] v3.1.18 (Cipater) 
---- **** ----- 
--- * *** * -- Darwin-14.5.0-x86_64-i386-64bit 
-- * - **** --- 
- ** ---------- [config] 
- ** ---------- .> app:   scraper:0x1084719d0 
- ** ---------- .> transport: redis://localhost:6379/0 
- ** ---------- .> results:  djcelery.backends.database:DatabaseBackend 
- *** --- * --- .> concurrency: 8 (prefork) 
-- ******* ---- 
--- ***** ----- [queues] 
-------------- .> celery   exchange=celery(direct) key=celery 


[tasks] 


[2015-09-14 07:46:43,805: ERROR/MainProcess] consumer: Cannot connect to redis://localhost:6379/0: Error 61 connecting to localhost:6379. Connection refused.. 
Trying again in 2.00 seconds... 

打字:which celery從在MAC命令提示返回:

/Users/Me/.virtualenvs/djangoscrape/bin/celery

which redis什麼都不做。

而且pip install redis顯示:在 /Users/Me/.virtualenvs/djangoscrape/lib/python2.7/site-packages

的Redis:

要求已經滿足(使用--upgrade升級)

+0

那麼你是否構建redis? http://jasdeep.ca/2012/05/installing-redis-on-mac-os-x/ –

回答

4

pip將只安裝用於連接到redis數據庫的Python庫。您需要自行安裝Redis服務器:在Mac上最簡單的方法是使用Homebrew。

相關問題