Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

redis installation using conda not working ModuleNotFoundError No module named 'redis'

As my pip proxy does not work and I had to use conda to install redis. After I successfully installed redis using conda. in python shell mode, I tried to import redis, and got the following error: ModuleNotFoundError: No module named 'redis'

Running Red Hat Enterprise Linux Server release 6.10 (Santiago) and anaconda 3, python 3.7.1

Any ideas how I can install redis correctly without using pip?

like image 347
Frank Avatar asked Apr 02 '19 20:04

Frank


1 Answers

This boils down to the fact that while conda's primary use is to support Python workflows, it's not a Python package manager, but a package manager that can package and distribute software built on any stack.

In particular, the redis package from the Anaconda channel is not the Python interface that you get through pip install redis. Rather it's Redis proper; the actual server software.

In the Anaconda channel, the Python interface is called redis-py, so if you already have Redis running somehow, you would just grab that one through

conda install redis-py
like image 127
fuglede Avatar answered Nov 15 '22 21:11

fuglede