llama_index: ModuleNotFoundError: No module named 'llama_index.query_engine'

Using 0.6.13 from llama_index.query_engine import RetrieverQueryEngine

getting ModuleNotFoundError: No module named ‘llama_index.query_engine’

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 15

Most upvoted comments

ok, I found the issue. thanks for you help

Bro finding and not telling ha it is disrespectfull 😦

ok, I found the issue. thanks for you help

The llama-index package format has changed, try importing this way and it should work:

from llama_index.core.query_engine import ...

They are now part of llama_index.core. This should work.

from llama_index.core.retrievers import VectorIndexRetriever from llama_index.core.query_engine import RetrieverQueryEngine from llama_index.core.indices.postprocessor import SimilarityPostprocessor

Hi there, in my case I was running the code in an outdated version of Jupyter, running the following commands fix it form me:

pip3 install --upgrade jupyter-console
pip3 install --upgrade jupyter

Thanks Labern31! Worked for me.

Yes, indeed! Thanks for the help @Labern31

@alonhartal do you have a python file called llama_index.py? If so, rename that to something else