ollama-python icon indicating copy to clipboard operation
ollama-python copied to clipboard

AttributeError: partially initialized module 'ollama' has no attribute 'chat' (most likely due to a circular import)

Open srtj opened this issue 9 months ago • 4 comments

how to fix this error: AttributeError: partially initialized module 'ollama' has no attribute 'chat' (most likely due to a circular import)

srtj avatar May 02 '24 11:05 srtj

I think I did the same thing and found a resolution.

Is your file named ollama.py? Rename it and try again.

ryanbarrett avatar May 02 '24 13:05 ryanbarrett

I think I did the same thing and found a resolution.

Is your file named ollama.py? Rename it and try again.

yes,you are right

L261173157 avatar May 06 '24 09:05 L261173157

Yes I got it ,thinks

srtj avatar May 07 '24 14:05 srtj

when i run "ollama serve" in terminal ,and then i open another terminal to import ollma , i meet the error image and my ollama-python version is 0.1.3 , is there any suggestions?Thanks

Albert337 avatar May 29 '24 02:05 Albert337