Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac Arm/M2 use #45

Open
jeffedstrom opened this issue Jan 28, 2025 · 0 comments
Open

Mac Arm/M2 use #45

jeffedstrom opened this issue Jan 28, 2025 · 0 comments

Comments

@jeffedstrom
Copy link

I have been following the install guide and have successfully progressed through all the steps outlined. When I go to run main.py, it fails due to an architecture issue with nexa.

Any guidance as to how to resolve would be much appreciated. The error is below:

(local_file_organizer) computador:Local-File-Organizer Jeff$ python main.py
Traceback (most recent call last):
File "/opt/homebrew/anaconda3/envs/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 "/opt/homebrew/anaconda3/envs/local_file_organizer/lib/python3.12/ctypes/init.py", line 379, in init
self._handle = _dlopen(self._name, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: dlopen(/opt/homebrew/anaconda3/envs/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/lib/libllama.dylib, 0x0006): tried: '/opt/homebrew/anaconda3/envs/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 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/anaconda3/envs/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/lib/libllama.dylib' (no such file), '/opt/homebrew/anaconda3/envs/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 'arm64e' or 'arm64'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/Jeff/AI_Tools/Local-File-Organizer/main.py", line 27, in
from nexa.gguf import NexaVLMInference, NexaTextInference # Import model classes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/anaconda3/envs/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/init.py", line 3, in
from .nexa_inference_vlm import NexaVLMInference
File "/opt/homebrew/anaconda3/envs/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/nexa_inference_vlm.py", line 22, in
from nexa.gguf.llama.llama_chat_format import (
File "/opt/homebrew/anaconda3/envs/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/llama/llama_chat_format.py", line 31, in
import nexa.gguf.llama.llama as llama
File "/opt/homebrew/anaconda3/envs/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/llama/llama.py", line 33, in
from nexa.gguf.llama.llama_grammar import LlamaGrammar
File "/opt/homebrew/anaconda3/envs/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/llama/llama_grammar.py", line 21, in
import nexa.gguf.llama.llama_cpp as llama_cpp
File "/opt/homebrew/anaconda3/envs/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/llama/llama_cpp.py", line 28, in
_lib = load_library(_lib_base_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/anaconda3/envs/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 '/opt/homebrew/anaconda3/envs/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/lib/libllama.dylib': dlopen(/opt/homebrew/anaconda3/envs/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/lib/libllama.dylib, 0x0006): tried: '/opt/homebrew/anaconda3/envs/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 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/anaconda3/envs/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/lib/libllama.dylib' (no such file), '/opt/homebrew/anaconda3/envs/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 'arm64e' or 'arm64'))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant