Immutable solution version
[Bug]: cannot import name 'LLM' from 'llama_index.core.llms'
Complete solution
LlamaIndex: Collaborator logan-markewich: the v0.10 split into namespaced packages (llama-index-core + integrations) means any remnants of an old 0.9.x install - globally, outside the venv, or pulled in by another dependency - break imports. Fix in a fresh terminal: pip uninstall llama-index (remove any global install), create a fresh venv, pip install llama-index --upgrade --no-cache-dir --force-reinstall.
The problem
Issue run-llama/llamaindex#11302 (closed, 23 comments): ### Bug Description When trying to import via ``` from llamaindex.core.indices import VectorStoreIndex from llamaindex.core.readers import SimpleDirectoryReader from llamaindex.core.storage import StorageContext `` ### Version 0.10.11 ### Steps to Reproduce install llama index in a new venv with poetry. I delted both .venv and poetry.lock - the error persists. ### Relevant Logs/Tracbacks ``shell ImportError Traceback (most recent call last) Cell In[8], line 1 ----> 1 from llamaindex.core.indices import VectorStoreIndex 2 from llamaindex.core.readers import SimpleDirectoryReader 3 fr
The verified fix
Collaborator logan-markewich: the v0.10 split into namespaced packages (llama-index-core + integrations) means any remnants of an old 0.9.x install - globally, outside the venv, or pulled in by another dependency - break imports. Fix in a fresh terminal: pip uninstall llama-index (remove any global install), create a fresh venv, pip install llama-index --upgrade --no-cache-dir --force-reinstall. Reporter lmaddox: also make sure llama-index-core is installed in minimal environments (not just llama-index).
Evidence
In gh:run-llama/llamaindex#11302 (https://github.com/run-llama/llamaindex/issues/11302), someone reported: Issue run-llama/llamaindex#11302 (closed, 23 comments): ### Bug Description When trying to import via ``` from llamaindex.core.indices import VectorStoreIndex from llamaindex.core.readers import SimpleDirectoryReader from llamaindex.core.storage import StorageContext `` ### Version 0.10.11 ### Steps to Reproduce install llama index in a new venv with poetry. I delted both .venv and poetry.lock - the error persists. ### Relevant Logs/Tracbacks ``shell ImportError Traceback (most recent call last) Cell In[8], line 1 ----> 1 from llamaindex.core.indices import VectorStoreIndex 2 from llamaindex.core.readers import SimpleDirectoryReader 3 fr The verified resolution from the thread: Collaborator logan-markewich: the v0.10 split into namespaced packages (llama-index-core + integrations) means any remnants of an old 0.9.x install - globally, outside the venv, or pulled in by another dependency - break imports. Fix in a fresh terminal: pip uninstall llama-index (remove any global install), create a fresh venv, pip install llama-index --upgrade --no-cache-dir --force-reinstall. Reporter lmaddox: also make sure llama-index-core is installed in minimal environments (not just llama-index).
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_ZF8xeAHfm34G42z8I4LHJw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">[Bug]: cannot import name 'LLM' from 'llama_index.core.llms' <span>— Vectle</span></a>