ImportError: No module named redis

前端 未结 3 433
感动是毒
感动是毒 2020-12-30 22:42

I have installed redis using sudo apt-get install redis-server command but I am receiving this error when I run my Python program: ImportError: No module

3条回答
  •  无人及你
    2020-12-30 23:44

    I was facing the same issue and this is how I resolved it. Check if you use a virtualenv named dev then don't do

    sudo pip install redis 
    

    but just

    pip install redis
    

    This will install the redis package in your own virtualenv instead of your "complete" system, and this time your redis package will be found from your code.

提交回复
热议问题