QiuYannnn / Local-File-Organizer

An AI-powered file management tool that ensures privacy by organizing local texts, images. Using Llama3.2 3B and Llava v1.6 models with the Nexa SDK, it intuitively scans, restructures, and organizes files for quick, seamless access and easy retrieval.
MIT License
1.65k stars 115 forks source link

Issues on Mac ARM #1

Closed wrabit closed 1 month ago

wrabit commented 1 month ago
  1. Needed to manual install matplotlib
  2. Upon running python main.py
$ python main.py
Matplotlib is building the font cache; this may take a moment.
Traceback (most recent call last):
  File "/Users/will/miniconda/envs/web-ui/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/lib_utils.py", line 69, in load_library
    return ctypes.CDLL(str(_lib_path), **cdll_args)  # type: ignore
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/will/miniconda/envs/web-ui/local_file_organizer/lib/python3.12/ctypes/__init__.py", line 379, in __init__
    self._handle = _dlopen(self._name, mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: dlopen(/Users/will/miniconda/envs/web-ui/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/lib/libllama.dylib, 0x0006): tried: '/Users/will/miniconda/envs/web-ui/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/lib/libllama.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/will/miniconda/envs/web-ui/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/lib/libllama.dylib' (no such file), '/Users/will/miniconda/envs/web-ui/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/lib/libllama.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/will/Code/Local-File-Organizer/main.py", line 13, in <module>
    from data_processing import (
  File "/Users/will/Code/Local-File-Organizer/data_processing.py", line 3, in <module>
    from nexa.gguf import NexaVLMInference, NexaTextInference
  File "/Users/will/miniconda/envs/web-ui/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/__init__.py", line 3, in <module>
    from .nexa_inference_vlm import NexaVLMInference
  File "/Users/will/miniconda/envs/web-ui/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/nexa_inference_vlm.py", line 22, in <module>
    from nexa.gguf.llama.llama_chat_format import (
  File "/Users/will/miniconda/envs/web-ui/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/llama/llama_chat_format.py", line 31, in <module>
    import nexa.gguf.llama.llama as llama
  File "/Users/will/miniconda/envs/web-ui/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/llama/llama.py", line 33, in <module>
    from nexa.gguf.llama.llama_grammar import LlamaGrammar
  File "/Users/will/miniconda/envs/web-ui/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/llama/llama_grammar.py", line 21, in <module>
    import nexa.gguf.llama.llama_cpp as llama_cpp
  File "/Users/will/miniconda/envs/web-ui/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/llama/llama_cpp.py", line 28, in <module>
    _lib = load_library(_lib_base_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/will/miniconda/envs/web-ui/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/lib_utils.py", line 71, in load_library
    raise RuntimeError(f"Failed to load shared library '{_lib_path}': {e}")
RuntimeError: Failed to load shared library '/Users/will/miniconda/envs/web-ui/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/lib/libllama.dylib': dlopen(/Users/will/miniconda/envs/web-ui/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/lib/libllama.dylib, 0x0006): tried: '/Users/will/miniconda/envs/web-ui/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/lib/libllama.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/will/miniconda/envs/web-ui/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/lib/libllama.dylib' (no such file), '/Users/will/miniconda/envs/web-ui/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/lib/libllama.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
QiuYannnn commented 1 month ago

Apologies for the late response. Could you provide the info of your laptop? It’s possible that the prebuilt wheel installation failed or that the Nexa SDK wasn’t set up correctly on the machine. You can follow the SDK installation instructions from the official documentation here: Nexa SDK Installation.