Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.12.2 Cannot import ollama #91

Open
Ray0907 opened this issue Mar 12, 2024 · 2 comments
Open

Python 3.12.2 Cannot import ollama #91

Ray0907 opened this issue Mar 12, 2024 · 2 comments

Comments

@Ray0907
Copy link

Ray0907 commented Mar 12, 2024

I attempted to utilize the example, but encountered some errors as follows.
Python 3.12.2 (main, Feb 6 2024, 20:19:44) [Clang 15.0.0 (clang-1500.1.0.2.5)] on darwin

import ollama
from ollama import create
ImportError: cannot import name 'create' from partially initialized module 'ollama' (most likely due to a circular import) 
@hanov
Copy link

hanov commented Mar 28, 2024

@Ray0907 rename your file from ollama.py to something different like test.py. It helped me. also keep in mind you need to install ollama with pip
pip3 install ollama

@ibrahim-string
Copy link

The ollama python api takes much longer time than ollama command line.
why is that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants