simonw / llm

Access large language models from the command-line
https://llm.datasette.io
Apache License 2.0
4.81k stars 266 forks source link

Installation borked after trying to uninstall gpt4all #598

Open ianconsolata opened 3 weeks ago

ianconsolata commented 3 weeks ago

I tried uninstalling the gpt4qall plugin, but I used the wrong command and it broke my installation:

❯ llm uninstall gpt4all
Found existing installation: gpt4all 2.8.2
Uninstalling gpt4all-2.8.2:
  Would remove:
    /opt/homebrew/Cellar/llm/0.16/libexec/lib/python3.12/site-packages/gpt4all-2.8.2.dist-info/*
    /opt/homebrew/Cellar/llm/0.16/libexec/lib/python3.12/site-packages/gpt4all/*
Proceed (Y/n)? Y
  Successfully uninstalled gpt4all-2.8.2

❯ llm models
Traceback (most recent call last):
  File "/opt/homebrew/bin/llm", line 5, in <module>
    from llm.cli import cli
  File "/opt/homebrew/Cellar/llm/0.16/libexec/lib/python3.12/site-packages/llm/__init__.py", line 18, in <module>
    from .plugins import pm
  File "/opt/homebrew/Cellar/llm/0.16/libexec/lib/python3.12/site-packages/llm/plugins.py", line 17, in <module>
    pm.load_setuptools_entrypoints("llm")
  File "/opt/homebrew/Cellar/llm/0.16/libexec/lib/python3.12/site-packages/pluggy/_manager.py", line 421, in load_setuptools_entrypoints
    plugin = ep.load()
             ^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.12/3.12.7_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/metadata/__init__.py", line 205, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.12/3.12.7_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/llm/0.16/libexec/lib/python3.12/site-packages/llm_gpt4all.py", line 1, in <module>
    from gpt4all import GPT4All as _GPT4All
ModuleNotFoundError: No module named 'gpt4all'