[Python] llama-cpp-python installing for x86_64 instead of arm64

Discussão em 'Python' iniciado por Stack, Junho 22, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to set up local, high speed NLP but am failing to install the arm64 version of llama-cpp-python.

    Even when I run

    CMAKE_ARGS="-DLLAMA_METAL=on -DLLAMA_METAL_EMBED_LIBRARY=on" \
    pip install llama-cpp-python --no-binary llama-cpp-python --force-reinstall --no-cache-dir


    I still get the same error when I try to import it:

    RuntimeError: Failed to load shared library '/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/llama_cpp/lib/libllama.dylib': dlopen(/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/llama_cpp/lib/libllama.dylib, 0x0006): tried: '/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/llama_cpp/lib/libllama.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/llama_cpp/lib/libllama.dylib' (no such file), '/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/llama_cpp/lib/libllama.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))

    Help would be greatly appreciated!

    Continue reading...

Compartilhe esta Página