Find answers from the community

Updated 9 months ago

Hello, I'm trying to upgrade my old

Hello, I'm trying to upgrade my old files from version 0.9 to 0.10 with llamaindex-cli upgrade-file myfile.py and get ImportError: cannot import name 'SimpleDirectoryReader' from 'llama_index.core' (unknown location) . Any recommendations ? Thanks
W
A
7 comments
I would suggest a fresh env to do this
if 0.9 was there and you just upgraded to 0.10 then it might raise some issues with file naming.

Start with a fresh env and try with the cli
ok thanks, I will try
@WhiteFang_Jr @Logan M any recomandation to fix below error
Plain Text
from llama_index.core.llms import ChatMessage, MessageRole

ImportError: cannot import name 'ChatMessage' from 'llama_index.core.llms' (unknown location)

I have already installed
llama-index 0.10.22
llama-index-core 0.10.22
Thanks
Did you create a new env?
yes, I think is working now, find in another post the fix
Plain Text
pip install llama-index --upgrade --no-cache-dir --force-reinstall
Add a reply
Sign up and join the conversation on Discord