zylon-ai / private-gpt

Interact with your documents using the power of GPT, 100% privately, no data leaks
https://docs.privategpt.dev
Apache License 2.0
53.06k stars 7.13k forks source link

error: no module named "injector" #1795

Open tvogt opened 3 months ago

tvogt commented 3 months ago

trying to get privategpt to run and running into this error no matter what I try:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "[redacted]/private-gpt/private_gpt/__main__.py", line 5, in <module>
    from private_gpt.main import app
  File "[redacted]/private-gpt/private_gpt/main.py", line 3, in <module>
    from private_gpt.di import global_injector
  File "[redacted]/private-gpt/private_gpt/di.py", line 1, in <module>
    from injector import Injector
ModuleNotFoundError: No module named 'injector'
make: *** [run] Error 1

I've been following the install instructions. I'm on MacOS 14.4 using Python 3.11.8. My precise command sequence was:

the result is the above error. All steps prior to the last one complete without errors, and ollama runs locally just fine, the model is loaded (I can chat with it), etc.

and

tvogt commented 3 months ago

After some more searching and fiddling, I came across issue 1378 - https://github.com/zylon-ai/private-gpt/issues/1378

Checking back, I noticed that the poetry install step indeed throws an error with ffmpy, though it then continues and completes without showing errors at the bottom.

Applying the fix from issue 1378's last comment:

pip install -U build==0.10.0
pip install -U ffmpy==0.3.1

before calling poetry install works and I now have privateGPT running.

Someone more familiar with pip and poetry should check this dependency issue. Apparently ffmpy is now 0.3.2 but the poetry.lock is set to 0.3.1 which poetry can't find?