我已經在我的virutalenv 'djangoscrape'
中安裝了celery
和redis
使用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
要求已經滿足(使用--upgrade升級)
那麼你是否構建redis? http://jasdeep.ca/2012/05/installing-redis-on-mac-os-x/ –