Find answers from the community

Updated 4 weeks ago

Importing Azure OpenAI with Llama_index v 0.12.2 in Python 3.10 Environment

Hello All,
I am trying llama_index v 0.12.2 and importing AzureOpenAI with PYthon3.10 env
(llama_index.llms.azure_openai import AzureOpenAI)
ImportError: cannot import name 'core' from 'llama_index' (unknown location)
any idea
W
h
L
8 comments
Try doing pip install -U llama-index-core
tried but still giving same error
Attachment
image.png
It could be that your env got borked somewhere, Try installing a a fresh env and then try again
thats what I thought tried it using pycharm once will try it again.
tried again new env creation using jupyeter an pycharm getting same error as as attached log
Just tried in a fresh colab, works for me
Attachment
image.png
Try a fresh venv. Pycharm is very annoying when doing this, but normally I would just open a terminal and do

Plain Text
python -m venv venv
source venv/bin/activate
pip install ...
It works in other envs, so its something specific to your setup and environment
Add a reply
Sign up and join the conversation on Discord