Install jax on macOS 15.1 Beta (24B5046f)

Following this instruction to install jax (https://developer.apple.com/metal/jax/), I still encountered this error:

RuntimeError: This version of jaxlib was built using AVX instructions, which your CPU and/or operating system do not support. This error is frequently encountered on macOS when running an x86 Python installation on ARM hardware. In this case, try installing an ARM build of Python. Otherwise, you may be able work around this issue by building jaxlib from source.

How to fix it?

Answered by TrafficTse in 804894022

Solved by ChatGPT's instructions:

DanielBurt@JoshuaGlennJenson ~ % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)" DanielBurt@JoshuaGlennJenson ~ % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" DanielBurt@JoshuaGlennJenson ~ % brew install python

DanielBurt@JoshuaGlennJenson ~ % rm -rf ~/PycharmProjects/.venv DanielBurt@JoshuaGlennJenson ~ % /opt/homebrew/bin/python3 -m venv ~/PycharmProjects/.venv

DanielBurt@JoshuaGlennJenson ~ % source ~/PycharmProjects/.venv/bin/activate (.venv) DanielBurt@JoshuaGlennJenson ~ % python -c "import platform; print(platform.platform())"

macOS-15.1-arm64-arm-64bit

(.venv) DanielBurt@JoshuaGlennJenson ~ % which python

/Users/DanielBurt/PycharmProjects/.venv/bin/python

(.venv) DanielBurt@JoshuaGlennJenson ~ % python -m pip install --upgrade pip

python -m pip install jax jaxlib --upgrade --no-deps -f https://storage.googleapis.com/jax-releases/jaxlib-apple-silicon.html

(.venv) DanielBurt@JoshuaGlennJenson ~ % python -m pip install ml-dtypes

(.venv) DanielBurt@JoshuaGlennJenson ~ % python -m pip install scipy opt-einsum

(.venv) DanielBurt@JoshuaGlennJenson ~ % python -c "import jax; print(jax.numpy.add(1, 2))"

3

Accepted Answer

Solved by ChatGPT's instructions:

DanielBurt@JoshuaGlennJenson ~ % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)" DanielBurt@JoshuaGlennJenson ~ % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" DanielBurt@JoshuaGlennJenson ~ % brew install python

DanielBurt@JoshuaGlennJenson ~ % rm -rf ~/PycharmProjects/.venv DanielBurt@JoshuaGlennJenson ~ % /opt/homebrew/bin/python3 -m venv ~/PycharmProjects/.venv

DanielBurt@JoshuaGlennJenson ~ % source ~/PycharmProjects/.venv/bin/activate (.venv) DanielBurt@JoshuaGlennJenson ~ % python -c "import platform; print(platform.platform())"

macOS-15.1-arm64-arm-64bit

(.venv) DanielBurt@JoshuaGlennJenson ~ % which python

/Users/DanielBurt/PycharmProjects/.venv/bin/python

(.venv) DanielBurt@JoshuaGlennJenson ~ % python -m pip install --upgrade pip

python -m pip install jax jaxlib --upgrade --no-deps -f https://storage.googleapis.com/jax-releases/jaxlib-apple-silicon.html

(.venv) DanielBurt@JoshuaGlennJenson ~ % python -m pip install ml-dtypes

(.venv) DanielBurt@JoshuaGlennJenson ~ % python -m pip install scipy opt-einsum

(.venv) DanielBurt@JoshuaGlennJenson ~ % python -c "import jax; print(jax.numpy.add(1, 2))"

3

Install jax on macOS 15.1 Beta (24B5046f)
 
 
Q