ollama-python
ollama-python copied to clipboard
Python 3.12.2 Cannot import ollama
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)
@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
The ollama python api takes much longer time than ollama command line. why is that?
The ollama python api takes much longer time than ollama command line. why is that?
when i use ollama python api, i meet the eroor as following
What I'm thinking is that the LLM model hasn't been called yet, is there any suggestions?Thanks
I've just uninstalled with 'pip uninstall ollama' and install again with 'pip3'. Also, I renamed my file and it works.