Find answers from the community

H
Hans L
Offline, last seen 3 months ago
Joined September 25, 2024
Hi! I am setting up llama_index for local development and can't get the import of local modules to resolve.

I followed the instructions at https://github.com/run-llama/llama_index/blob/79fce27802943b8eb093f8cb37d278a3b4a1e213/CONTRIBUTING.md and https://docs.llamaindex.ai/en/stable/getting_started/installation.html#installation-from-source, and all works fine up until then.

But then I can't get the import of the module (e.g. OpenAI) from the package that I installed locally with pip install -e llama-index-integrations/llms/llama-index-llms-openai to work. I tried both the usual import for installed packages (e.g. from llama_index.llms.openai import OpenAI) and a relative import from the local directory (with importlib.import_module), but I can't get anything to resolve.

Probably something simple I am missing here ...? Any help would be appreciated 🙏
5 comments
H
W
s