Encountering an error while trying to import SimpleDirectoryReader using llama_index

When attempting to import SimpleDirectoryReader using llama_index, an error occurs stating “cannot import name ‘SimpleDirectoryReader’ from ‘llama_index’ (unknown location).” This is because SimpleDirectoryReader is not available directly in llama_index. Instead, refer to the llama_index.core module as specified in the llama-index official documentation.

Please share screenshot of the error you are mentioning

Please find the attachment below :

If I use llama-index.core it is working but not working with the llama-index .

Is the

Is the llama-index and llama-index.core in the same location in your system?

Also what is that internet connection issue mentioned on top of your browser??

Is the llama-index and llama-index.core in the same location in your system? - Yeah in same location and I’m not only the one who faced the issue , even some of my friends faced same issue.
And the internet connection error is of colab that is the not major issue.

Can you specify the latest version or supporting of llama-index , so that we don’t need to use .core in the module defining.

Hello @Mohan7

Can you try the below comment steps once

Let me know if the step helped your issue or not.

I feel other than llama-index, you also need some other dependencies to be downloaded in your system or colab notebook. when you get that error, again, click on that open example, and see what shows.


Now It worked for me using llama_index.core , problem has been solved and Can you tell me will do I face any issues using llama_index.core.

Hello @Mohan7

If you face again any issue, kindly raise a concern at the discourse community here.

Although when I asked learning technologist of Short course, the below was his response :point_down:

As for the short courses, since LLM is a new field, all the related libraries get updated frequently. So you can tell the learners that if everything is working on the platform, but not anywhere else, it is probably because they have version compatibility issues, which they should be encouraged to explore on their own and help the community with their findings.

But as long as you face any issue, you can always raise a concern here. Mentors, Deep Learning.AI QA Team and Learning Technologist will try best to address the issue.

Keep Learning!!!


can you please tell, how you resolve this issue because i am also facing the same issue which you mentioned in your snapshot.

Instead of writing “llama-index” write the package as “llama-index.core”.

Thanks Deepti , resolved the issue by using llama-index.core . No problem now .
Thanks a lot for your quick response to the query.

1 Like