Closed aizzataffero closed 1 year ago
Try running "pip show llama-index" and make sure that the package was installed.
it is infact
(quanization) C:\Users\derdi\local_llama>pip show llama-index
Name: llama-index
Version: 0.6.10
Summary: Interface between LLMs and your data
Home-page: https://github.com/jerryjliu/llama_index
Author:
Author-email:
License: MIT
Location: c:\users\derdi\.conda\envs\quanization\lib\site-packages
Requires: dataclasses-json, fsspec, langchain, numpy, openai, pandas, requests, tenacity, tiktoken, typing-extensions, typing-inspect
Required-by:
i cant even import llama_index
>>> import llama_index
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\derdi\.conda\envs\quanization\lib\site-packages\llama_index\__init__.py", line 18, in <module>
from llama_index.indices.common.struct_store.base import SQLDocumentContextBuilder
File "C:\Users\derdi\.conda\envs\quanization\lib\site-packages\llama_index\indices\__init__.py", line 4, in <module>
from llama_index.indices.keyword_table.base import GPTKeywordTableIndex
File "C:\Users\derdi\.conda\envs\quanization\lib\site-packages\llama_index\indices\keyword_table\__init__.py", line 4, in <module>
from llama_index.indices.keyword_table.base import GPTKeywordTableIndex
File "C:\Users\derdi\.conda\envs\quanization\lib\site-packages\llama_index\indices\keyword_table\base.py", line 18, in <module>
from llama_index.indices.base import BaseGPTIndex
File "C:\Users\derdi\.conda\envs\quanization\lib\site-packages\llama_index\indices\base.py", line 8, in <module>
from llama_index.indices.base_retriever import BaseRetriever
File "C:\Users\derdi\.conda\envs\quanization\lib\site-packages\llama_index\indices\base_retriever.py", line 5, in <module>
from llama_index.indices.query.schema import QueryBundle, QueryType
File "C:\Users\derdi\.conda\envs\quanization\lib\site-packages\llama_index\indices\query\__init__.py", line 3, in <module>
from llama_index.indices.query.response_synthesis import ResponseSynthesizer
File "C:\Users\derdi\.conda\envs\quanization\lib\site-packages\llama_index\indices\query\response_synthesis.py", line 5, in <module>
from llama_index.indices.postprocessor.types import BaseNodePostprocessor
File "C:\Users\derdi\.conda\envs\quanization\lib\site-packages\llama_index\indices\postprocessor\__init__.py", line 4, in <module>
from llama_index.indices.postprocessor.node import (
File "C:\Users\derdi\.conda\envs\quanization\lib\site-packages\llama_index\indices\postprocessor\node.py", line 236, in <module>
class AutoPrevNextNodePostprocessor(BasePydanticNodePostprocessor):
File "pydantic\main.py", line 197, in pydantic.main.ModelMetaclass.__new__
File "pydantic\fields.py", line 506, in pydantic.fields.ModelField.infer
File "pydantic\fields.py", line 436, in pydantic.fields.ModelField.__init__
File "pydantic\fields.py", line 557, in pydantic.fields.ModelField.prepare
File "pydantic\fields.py", line 831, in pydantic.fields.ModelField.populate_validators
File "pydantic\validators.py", line 725, in find_validators
File "pydantic\dataclasses.py", line 478, in make_dataclass_validator
else:
File "pydantic\dataclasses.py", line 231, in pydantic.dataclasses.dataclass
File "pydantic\dataclasses.py", line 224, in pydantic.dataclasses.dataclass.wrap
File "pydantic\dataclasses.py", line 347, in pydantic.dataclasses._add_pydantic_validation_attributes
self.repr = repr
File "pydantic\dataclasses.py", line 400, in pydantic.dataclasses.create_pydantic_model_from_dataclass
def _tuple_str(obj_name, fields):
File "pydantic\main.py", line 1026, in pydantic.main.create_model
File "pydantic\main.py", line 197, in pydantic.main.ModelMetaclass.__new__
File "pydantic\fields.py", line 506, in pydantic.fields.ModelField.infer
File "pydantic\fields.py", line 436, in pydantic.fields.ModelField.__init__
File "pydantic\fields.py", line 552, in pydantic.fields.ModelField.prepare
File "pydantic\fields.py", line 639, in pydantic.fields.ModelField._type_analysis
File "C:\Users\derdi\.conda\envs\quanization\lib\typing.py", line 1498, in __instancecheck__
raise TypeError("Instance and class checks can only be used with"
TypeError: Instance and class checks can only be used with @runtime_checkable protocols
ImportError: cannot import name 'download_loader' from 'llama_index' (unknown location) Traceback: File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 565, in _run_script exec(code, module.dict) File "C:\Users\user\Desktop\pyscripttest\PDFGPT\gpt_chatwithPDF\gpt_cust_kb.py", line 1, in
from llama_index import download_loader, SimpleDirectoryReader, ServiceContext, LLMPredictor, GPTVectorStoreIndex, PromptHelper, StorageContext, load_index_from_storage