openrecall / openrecall

OpenRecall is a fully open-source, privacy-first alternative to proprietary solutions like Microsoft's Windows Recall. With OpenRecall, you can easily access your digital history, enhancing your memory and productivity without compromising your privacy.
GNU Affero General Public License v3.0
1.47k stars 65 forks source link

Failed to run due to `No module named 'doctr'` #44

Closed AndesKrrrrrrrrrrr closed 1 week ago

AndesKrrrrrrrrrrr commented 2 weeks ago

Getting module errors when running after install (OS: Linux)

Running

python3 -m pip install --upgrade --no-cache-dir git+https://github.com/openrecall/openrecall.git 
python3 -m openrecall.app

Gives this output (and error)

# Install
Defaulting to user installation because normal site-packages is not writeable
Collecting git+https://github.com/openrecall/openrecall.git
  Cloning https://github.com/openrecall/openrecall.git to /tmp/pip-req-build-gvdxm4gk
  Running command git clone --filter=blob:none --quiet https://github.com/openrecall/openrecall.git /tmp/pip-req-build-gvdxm4gk
  Resolved https://github.com/openrecall/openrecall.git to commit 5f00e3d8ec00f355174c4b3cdb741991bd28c74c
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: Flask==3.0.3 in ./.local/lib/python3.12/site-packages (from OpenRecall==0.5) (3.0.3)
Requirement already satisfied: numpy==1.26.4 in ./.local/lib/python3.12/site-packages (from OpenRecall==0.5) (1.26.4)
Requirement already satisfied: mss==9.0.1 in ./.local/lib/python3.12/site-packages (from OpenRecall==0.5) (9.0.1)
Requirement already satisfied: pillow==10.3.0 in /usr/lib64/python3.12/site-packages (from OpenRecall==0.5) (10.3.0)
Requirement already satisfied: sentence-transformers==3.0.0 in ./.local/lib/python3.12/site-packages (from OpenRecall==0.5) (3.0.0)
Requirement already satisfied: torch==2.3.0 in ./.local/lib/python3.12/site-packages (from OpenRecall==0.5) (2.3.0)
Requirement already satisfied: torchvision==0.18.0 in ./.local/lib/python3.12/site-packages (from OpenRecall==0.5) (0.18.0)
Requirement already satisfied: shapely in ./.local/lib/python3.12/site-packages (from OpenRecall==0.5) (2.0.4)
Requirement already satisfied: h5py in ./.local/lib/python3.12/site-packages (from OpenRecall==0.5) (3.11.0)
Requirement already satisfied: rapidfuzz in ./.local/lib/python3.12/site-packages (from OpenRecall==0.5) (3.9.3)
Requirement already satisfied: Werkzeug>=3.0.0 in ./.local/lib/python3.12/site-packages (from Flask==3.0.3->OpenRecall==0.5) (3.0.3)
Requirement already satisfied: Jinja2>=3.1.2 in ./.local/lib/python3.12/site-packages (from Flask==3.0.3->OpenRecall==0.5) (3.1.4)
Requirement already satisfied: itsdangerous>=2.1.2 in ./.local/lib/python3.12/site-packages (from Flask==3.0.3->OpenRecall==0.5) (2.2.0)
Requirement already satisfied: click>=8.1.3 in /usr/lib/python3.12/site-packages (from Flask==3.0.3->OpenRecall==0.5) (8.1.3)
Requirement already satisfied: blinker>=1.6.2 in ./.local/lib/python3.12/site-packages (from Flask==3.0.3->OpenRecall==0.5) (1.8.2)
Requirement already satisfied: transformers<5.0.0,>=4.34.0 in ./.local/lib/python3.12/site-packages (from sentence-transformers==3.0.0->OpenRecall==0.5) (4.41.2)
Requirement already satisfied: tqdm in ./.local/lib/python3.12/site-packages (from sentence-transformers==3.0.0->OpenRecall==0.5) (4.66.4)
Requirement already satisfied: scikit-learn in ./.local/lib/python3.12/site-packages (from sentence-transformers==3.0.0->OpenRecall==0.5) (1.5.0)
Requirement already satisfied: scipy in ./.local/lib/python3.12/site-packages (from sentence-transformers==3.0.0->OpenRecall==0.5) (1.13.0)
Requirement already satisfied: huggingface-hub>=0.15.1 in ./.local/lib/python3.12/site-packages (from sentence-transformers==3.0.0->OpenRecall==0.5) (0.23.3)
Requirement already satisfied: filelock in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (3.14.0)
Requirement already satisfied: typing-extensions>=4.8.0 in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (4.12.2)
Requirement already satisfied: sympy in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (1.12.1)
Requirement already satisfied: networkx in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (3.3)
Requirement already satisfied: fsspec in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (2024.6.0)
Requirement already satisfied: nvidia-cuda-nvrtc-cu12==12.1.105 in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (12.1.105)
Requirement already satisfied: nvidia-cuda-runtime-cu12==12.1.105 in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (12.1.105)
Requirement already satisfied: nvidia-cuda-cupti-cu12==12.1.105 in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (12.1.105)
Requirement already satisfied: nvidia-cudnn-cu12==8.9.2.26 in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (8.9.2.26)
Requirement already satisfied: nvidia-cublas-cu12==12.1.3.1 in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (12.1.3.1)
Requirement already satisfied: nvidia-cufft-cu12==11.0.2.54 in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (11.0.2.54)
Requirement already satisfied: nvidia-curand-cu12==10.3.2.106 in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (10.3.2.106)
Requirement already satisfied: nvidia-cusolver-cu12==11.4.5.107 in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (11.4.5.107)
Requirement already satisfied: nvidia-cusparse-cu12==12.1.0.106 in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (12.1.0.106)
Requirement already satisfied: nvidia-nccl-cu12==2.20.5 in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (2.20.5)
Requirement already satisfied: nvidia-nvtx-cu12==12.1.105 in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (12.1.105)
Requirement already satisfied: nvidia-nvjitlink-cu12 in ./.local/lib/python3.12/site-packages (from nvidia-cusolver-cu12==11.4.5.107->torch==2.3.0->OpenRecall==0.5) (12.5.40)
Requirement already satisfied: packaging>=20.9 in /usr/lib/python3.12/site-packages (from huggingface-hub>=0.15.1->sentence-transformers==3.0.0->OpenRecall==0.5) (23.1)
Requirement already satisfied: pyyaml>=5.1 in /usr/lib64/python3.12/site-packages (from huggingface-hub>=0.15.1->sentence-transformers==3.0.0->OpenRecall==0.5) (6.0.1)
Requirement already satisfied: requests in /usr/lib/python3.12/site-packages (from huggingface-hub>=0.15.1->sentence-transformers==3.0.0->OpenRecall==0.5) (2.28.2)
Requirement already satisfied: MarkupSafe>=2.0 in ./.local/lib/python3.12/site-packages (from Jinja2>=3.1.2->Flask==3.0.3->OpenRecall==0.5) (2.1.5)
Requirement already satisfied: regex!=2019.12.17 in /usr/lib64/python3.12/site-packages (from transformers<5.0.0,>=4.34.0->sentence-transformers==3.0.0->OpenRecall==0.5) (2024.4.16)
Requirement already satisfied: tokenizers<0.20,>=0.19 in ./.local/lib/python3.12/site-packages (from transformers<5.0.0,>=4.34.0->sentence-transformers==3.0.0->OpenRecall==0.5) (0.19.1)
Requirement already satisfied: safetensors>=0.4.1 in ./.local/lib/python3.12/site-packages (from transformers<5.0.0,>=4.34.0->sentence-transformers==3.0.0->OpenRecall==0.5) (0.4.3)
Requirement already satisfied: joblib>=1.2.0 in ./.local/lib/python3.12/site-packages (from scikit-learn->sentence-transformers==3.0.0->OpenRecall==0.5) (1.4.2)
Requirement already satisfied: threadpoolctl>=3.1.0 in ./.local/lib/python3.12/site-packages (from scikit-learn->sentence-transformers==3.0.0->OpenRecall==0.5) (3.5.0)
Requirement already satisfied: mpmath<1.4.0,>=1.1.0 in ./.local/lib/python3.12/site-packages (from sympy->torch==2.3.0->OpenRecall==0.5) (1.3.0)
Requirement already satisfied: charset-normalizer<4,>=2 in /usr/lib/python3.12/site-packages (from requests->huggingface-hub>=0.15.1->sentence-transformers==3.0.0->OpenRecall==0.5) (3.2.0)
Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3.12/site-packages (from requests->huggingface-hub>=0.15.1->sentence-transformers==3.0.0->OpenRecall==0.5) (3.7)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/lib/python3.12/site-packages (from requests->huggingface-hub>=0.15.1->sentence-transformers==3.0.0->OpenRecall==0.5) (1.26.18)

[notice] A new release of pip is available: 23.3.2 -> 24.0
[notice] To update, run: python3 -m pip install --upgrade pip
# Running
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/var/home/me/.local/lib/python3.12/site-packages/openrecall/app.py", line 10, in <module>
    from openrecall.screenshot import record_screenshots_thread
  File "/var/home/me/.local/lib/python3.12/site-packages/openrecall/screenshot.py", line 11, in <module>
    from openrecall.ocr import extract_text_from_image
  File "/var/home/me/.local/lib/python3.12/site-packages/openrecall/ocr.py", line 1, in <module>
    from doctr.models import ocr_predictor
ModuleNotFoundError: No module named 'doctr'
kodxana commented 2 weeks ago

Fixed with

pip install python-doctr
minhhieugma commented 2 weeks ago

pip install python-doctr

After ran it, I have another issue

OSError: cannot load library 'gobject-2.0-0': error 0x7e.  Additionally, ctypes.util.find_library() did not manage to locate a library called 'gobject-2.0-0'
Sa1ToBob commented 2 weeks ago

Hi, I got same problem. I was able to fix it with installing GTK for windows. https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases (other issue on github where I found it... https://github.com/Kozea/WeasyPrint/issues/2071) (py 3.11 in use)

koenvaneijk commented 1 week ago

The new setup.py should have these issues fixed. Please re-open this if you are still experiencing issues!