ImportError: No module named redis

前端 未结 3 422
感动是毒
感动是毒 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:36

    I had the same issue, the error was that the default pip was 'pip3', and the redis package was installed under python3 packages.

    This is not a redis specific issue, but if this is the case for you, try running:

    sudo pip2 install redis
    

提交回复
热议问题