i followed the instructions given by the official tf documentation, but i just cannot resolve the various problems encountered. Did anyone have the experience installing tff on m1 mac and can show me your overall process?
conda create -n federated python=3.8
conda activate federated
pip install --upgrade tensorflow_federated
everything seems to be fine according to the terminal output, however, after
import tensorflow_federated as tff
i got a RunTimeError:
RuntimeError: This version of jaxlib was built using AVX instructions, which your CPU and/or operating system do not support. You may be able work around this issue by building jaxlib from source.
how to resolve this?
Install miniforge with Apple's arm64: Apple Silicon Method. Then, put it where Anaconda places its initialization code, that is in
~/zshrc
.This would make miniforge the default manager. Following which you need to create a
~/.start_anaconda.sh
script so that Anaconda can be used as an alternative.With miniforge,
mytraxenv
withconda create -n mytraxenv python=3
which has your python version.conda activate mytraxenv
conda install numpy
andconda install six
to ensurenumpy.six
andwheel
inmytraxenv
environment.pip install -U pip pip install -U
Lastly follow these instructions to install
pip install --upgrade pip
pip install --upgrade "jax[cpu]"