Aider-AI / aider

aider is AI pair programming in your terminal
https://aider.chat/
Apache License 2.0
22.76k stars 2.12k forks source link

Uncaught ImportError in __init__.py line 78 #2361

Closed ShoabSaadat closed 2 weeks ago

ShoabSaadat commented 2 weeks ago

Aider version: 0.62.1 Python version: 3.11.8 Platform: Linux-6.1.112+-x86_64-with-glibc2.38 Python implementation: CPython Virtual environment: Yes OS: Linux 6.1.112+ (64bit) Git version: git version 2.42.2

An uncaught exception occurred:

Traceback (most recent call last):
  File "aider", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "main.py", line 582, in main
    models.print_matching_models(io, args.list_models)
  File "models.py", line 1139, in print_matching_models
    matches = fuzzy_match_models(search)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "models.py", line 1103, in fuzzy_match_models
    for model, attrs in litellm.model_cost.items():
                        ^^^^^^^^^^^^^^^^^^
  File "llm.py", line 23, in __getattr__
    self._load_litellm()
  File "llm.py", line 30, in _load_litellm
    self._lazy_module = importlib.import_module("litellm")
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "__init__.py", line 858, in <module>
    from .cost_calculator import completion_cost
  File "cost_calculator.py", line 22, in <module>
    from litellm.llms.anthropic.cost_calculation import (
  File "cost_calculation.py", line 9, in <module>
    from litellm.utils import get_model_info
  File "utils.py", line 52, in <module>
    from tokenizers import Tokenizer
  File "__init__.py", line 78, in <module>
    from .tokenizers import (
ImportError: libstdc++.so.6: cannot open shared object file: No such file or directory
paul-gauthier commented 2 weeks ago

Thanks for trying aider and filing this issue.

This looks like a duplicate of #1313. Please see the comments there for more information, and feel free to continue the discussion within that issue.

I'm going to close this issue for now. But please let me know if you think this is actually a distinct issue and I will reopen this issue.