Find answers from the community

Updated 6 months ago

Import

At a glance
hello, i hope someone can help me Im trying to use llama-index but i keep running into some module import issue: Import "llama_index.query_engine" could not be resolvedPylancereportMissingImports. I would really appriciate help since ive been stuck on this all day
Attachments
image.png
image.png
L
k
15 comments
In v0.10.x, imports changed slightly. Integrations are also separate packages now

The import here is `from llama_index.core.query_engine import PandasQueryEngine
I tried this but still the same thing
could it be how im installing it?
You might need a fresh venv
do i just do python3 -m venv {name} ?
bc if thats the case i already did that twice
In a fresh terminal

Plain Text
pip uninstall llama-index # remove any global
python -m venv venv
source venv/bin/activate
pip install llama-index


You can test it worked really quickly
python -c "from llama_index.core.query_engine import PandasQueryEngine

The import is here
https://github.com/run-llama/llama_index/blob/2c14a471ee45d6fd872882be561c35937025e29e/llama-index-core/llama_index/core/query_engine/__init__.py#L76


It also works for me locally and on Google colab πŸ‘€
its not working for me idk lol maybe its cuz im in a mac its fine thanks for trying tho
I'm on a Mac as well lol
I really think it's env related.

Is your code actually failing or is this just your IDE/Pylance complaining?
wait ill try to uninstall python and install the newest version
no its not the code im sure of it because it gives me an issue with the import
Like running the code gives the error? Or it's just being flagged in your code editor? (Still not sure which haha)
Yo I appreciate it g I got it work lol, now I just got an error because I had 407k lines of data and I gotta pay lol
Add a reply
Sign up and join the conversation on Discord