0

I have two imports

import redis
from redis.commands.json.path import Path

redis is installed, however I'm getting

ModuleNotFoundError: No module named 'redis.commands'

Any solution for that?

1
  • 2
    What version of the package are you using ? Should be > v4.0 Commented Jul 8, 2022 at 12:58

2 Answers 2

2

Install redis correctly:

$ python -m pip install --upgrade redis

If you are using conda:

$ conda install -c conda-forge redis-py

Then try:

import redis
from redis.commands.json.path import Path
# ...

See the redis-py documentation for more information.

Sign up to request clarification or add additional context in comments.

Comments

0

Most likely you have an older version of the Redis libraries. Try:

pip install --upgrade redis

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.