mirror of
https://github.com/ollama/ollama-python.git
synced 2026-07-21 00:55:21 -04:00
AttributeError: partially initialized module 'ollama' has no attribute 'chat' (most likely due to a circular import) #79
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @srtj on GitHub (May 2, 2024).
how to fix this error:
AttributeError: partially initialized module 'ollama' has no attribute 'chat' (most likely due to a circular import)
@ryanbarrett commented on GitHub (May 2, 2024):
I think I did the same thing and found a resolution.
Is your file named ollama.py? Rename it and try again.
@L261173157 commented on GitHub (May 6, 2024):
yes,you are right
@srtj commented on GitHub (May 7, 2024):
Yes I got it ,thinks
@Albert337 commented on GitHub (May 28, 2024):
when i run "ollama serve" in terminal ,and then i open another terminal to import ollma , i meet the error

and my ollama-python version is 0.1.3 , is there any suggestions?Thanks