user3476463
user3476463

Reputation: 4575

import SimpleDirectoryReader from llama-index

I have a conda virtual python 3.10.12 environment named LLM. I've created it on my ubuntu 18.04 LTS server. I've pip installed llama-index 0.6.9 into the virtual environment because llama-index wasn't available through conda.

when I try to import SimpleDirectoryReader from llama-index in a jupyter notebook using the code below, I'm getting the error below. but "from llama_index import Document" works just fine.

Can anyone suggest how to fix the issue?

code:

from llama_index import SimpleDiretoryReader, Document

error:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[11], line 1
----> 1 from llama_index import SimpleDiretoryReader, Document

ImportError: cannot import name 'SimpleDiretoryReader' from 'llama_index' (/home/username/anaconda3/envs/LLM/lib/python3.10/site-packages/llama_index/__init__.py)

Upvotes: 0

Views: 1576

Answers (1)

ZKS
ZKS

Reputation: 2836

Your line of code

from llama_index import SimpleDiretoryReader, Document

New Line you need to add or modify

from llama_index import SimpleDirectoryReader, Document

Upvotes: 3

Related Questions