ragflow icon indicating copy to clipboard operation
ragflow copied to clipboard

[Question]: No module named 'ollama' linux-ragflow-server start

Open tntfantuan opened this issue 10 months ago • 2 comments

Describe your problem

ModuleNotFoundError: No module named 'ollama' 2025-02-24 17:42:53,014 INFO 8129 ragflow_server log path: /ragflow/logs/ragflow_server.log, log levels: {'peewee': 'WARNING', 'pdfminer': 'WARNING', 'root': 'INFO'} 2025-02-24 17:43:01,263 INFO 8129 init database on cluster mode successfully Traceback (most recent call last): File "/ragflow/api/ragflow_server.py", line 34, in from api.apps import app File "/ragflow/api/apps/init.py", line 136, in client_urls_prefix = [ File "/ragflow/api/apps/init.py", line 137, in register_page(path) for dir in pages_dir for path in search_pages_path(dir) File "/ragflow/api/apps/init.py", line 120, in register_page spec.loader.exec_module(page) File "/ragflow/api/apps/file2document_app.py", line 17, in from api.db.services.file2document_service import File2DocumentService File "/ragflow/api/db/services/file2document_service.py", line 22, in from api.db.services.document_service import DocumentService File "/ragflow/api/db/services/document_service.py", line 31, in from graphrag.general.mind_map_extractor import MindMapExtractor File "/ragflow/graphrag/general/mind_map_extractor.py", line 26, in from graphrag.general.extractor import Extractor File "/ragflow/graphrag/general/extractor.py", line 26, in from rag.llm.chat_model import Base as CompletionLLM File "/ragflow/rag/llm/init.py", line 18, in from .embedding_model import ( File "/ragflow/rag/llm/embedding_model.py", line 24, in from ollama import Client

tntfantuan avatar Feb 24 '25 09:02 tntfantuan

pip install ollama

KevinHuSh avatar Feb 25 '25 02:02 KevinHuSh

pip install ollama

  1. docker exec -it ragflow-server /bin/bash
  2. pip install ollama==0.2.1 httpx==0.27.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
  3. docker restart ragflow-server
  4. docker logs ragflow-server
  5. 2025-02-26 09:52:33,215 INFO 782 init database on cluster mode successfully Traceback (most recent call last): File "/ragflow/api/ragflow_server.py", line 34, in from api.apps import app File "/ragflow/api/apps/init.py", line 136, in client_urls_prefix = [ File "/ragflow/api/apps/init.py", line 137, in register_page(path) for dir in pages_dir for path in search_pages_path(dir) File "/ragflow/api/apps/init.py", line 120, in register_page spec.loader.exec_module(page) File "/ragflow/api/apps/file2document_app.py", line 17, in from api.db.services.file2document_service import File2DocumentService File "/ragflow/api/db/services/file2document_service.py", line 22, in from api.db.services.document_service import DocumentService File "/ragflow/api/db/services/document_service.py", line 31, in from graphrag.general.mind_map_extractor import MindMapExtractor File "/ragflow/graphrag/general/mind_map_extractor.py", line 26, in from graphrag.general.extractor import Extractor File "/ragflow/graphrag/general/extractor.py", line 26, in from rag.llm.chat_model import Base as CompletionLLM File "/ragflow/rag/llm/init.py", line 18, in from .embedding_model import ( File "/ragflow/rag/llm/embedding_model.py", line 24, in from ollama import Client ModuleNotFoundError: No module named 'ollama' 2025-02-26 09:52:37,698 INFO 853 ragflow_server log path: /ragflow/logs/ragflow_server.log, log levels: {'peewee': 'WARNING', 'pdfminer': 'WARNING', 'root': 'INFO'}

I tried this operation, but the problem still persists ...

tntfantuan avatar Feb 26 '25 01:02 tntfantuan