paul-gauthier / aider

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

Uncaught ImportError in _csr.py line 11 #1412

Closed ernestofosu05 closed 6 days ago

ernestofosu05 commented 1 week ago

Aider version: 0.55.0 Python version: 3.11.9 Platform: Linux-6.5.0-1025-gcp-x86_64-with-glibc2.39 Python implementation: CPython Virtual environment: No OS: Linux 6.5.0-1025-gcp (64bit) Git version: git version 2.42.0

An uncaught exception occurred:

Traceback (most recent call last):
  File "aider", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "main.py", line 694, in main
    coder.run()
  File "base_coder.py", line 730, in run
    self.run_one(user_message, preproc)
  File "base_coder.py", line 773, in run_one
    list(self.send_message(message))
  File "base_coder.py", line 1083, in send_message
    chunks = self.format_messages()
             ^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 1021, in format_messages
    chunks = self.format_chat_chunks()
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 971, in format_chat_chunks
    chunks.repo = self.get_repo_messages()
                  ^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 627, in get_repo_messages
    repo_content = self.get_repo_map()
                   ^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 599, in get_repo_map
    repo_content = self.repo_map.get_repo_map(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "repomap.py", line 124, in get_repo_map
    files_listing = self.get_ranked_tags_map(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "repomap.py", line 468, in get_ranked_tags_map
    result = self.get_ranked_tags_map_uncached(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "repomap.py", line 499, in get_ranked_tags_map_uncached
    ranked_tags = self.get_ranked_tags(
                  ^^^^^^^^^^^^^^^^^^^^^
  File "repomap.py", line 389, in get_ranked_tags
    ranked = nx.pagerank(G, weight="weight", **pers_args)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "backends.py", line 412, in __call__
    return self.orig_func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "pagerank_alg.py", line 110, in pagerank
    return _pagerank_scipy(
           ^^^^^^^^^^^^^^^^
  File "pagerank_alg.py", line 460, in _pagerank_scipy
    A = nx.to_scipy_sparse_array(G, nodelist=nodelist, weight=weight, dtype=float)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "backends.py", line 412, in __call__
    return self.orig_func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "convert_matrix.py", line 599, in to_scipy_sparse_array
    A = sp.sparse.coo_array((data, (row, col)), shape=(nlen, nlen), dtype=dtype)
        ^^^^^^^^^
  File "__init__.py", line 134, in __getattr__
    return _importlib.import_module(f'scipy.{name}')
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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 295, in <module>
    from ._csr import *
  File "_csr.py", line 11, in <module>
    from ._sparsetools import (csr_tocsc, csr_tobsr, csr_count_blocks,
ImportError: libstdc++.so.6: cannot open shared object file: No such file or directory
fry69 commented 1 week ago

Please see here -> https://github.com/paul-gauthier/aider/issues/1405#issuecomment-2335192175

paul-gauthier commented 1 week ago

Thanks for trying aider and filing this issue.

How did you install aider? What environment are you using?

It looks like you don't have the correct set of dependencies installed.

paul-gauthier commented 6 days ago

I'm going to close this issue for now, but feel free to add a comment here and I will re-open. Or feel free to file a new issue any time.