简体   繁体   中英

installed django-redis in python virtualenv, redis-cli command not found

I just install django-redit using pip in my python virtualenv,but when I enter command redis-cli , it shows me redis-cli command not found .

I'm pretty much sure redis-cli has been installed sucessfully. need your help thx in advance

Follow this commands:

virtualenv env
source env/bin/activate
pip3 install django
pip install redis

You need to install the Redis client/server ( https://redis.io/ ). Depending on you OS you maybe can install this directly by OS repository.

Install REDIS with brew (for django)

  • brew install redis

  • brew list

  • if you want run redis when you start project: shell ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents

  • start redis with brew: brew services start redis

  • start redis with config: redis-server /usr/local/etc/redis.conf

  • brew services stop redis

  • redis config location: /usr/local/etc/redis.conf

  • redis detail: brew info redis

  • redis test: redis-cli ping

  • pipenv install django-redis-cache

  • brew uninstall redis

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM