谁能给我一份在 M1 Mac 上安装 tensorflow-federated 的综合指南?
我遵循官方TF文档给出的说明,但我无法解决遇到的各种问题。 是否有人有在M1 Mac上安装TFF的经验,可以向我展示您的整体过程?
conda create -n federated python=3.8
conda activate federated
pip install --upgrade tensorflow_federated
但是,根据终端输出,一切似乎都很好 在
import tensorflow_federated as tff
我得到运行时:
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.
如何解决这个问题?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用〜/ZSHRC 中。
这将使Miniforge成为默认经理。之后,您需要创建
〜/.start_anaconda.sh
脚本,以便可以将Anaconda用作替代方案。使用miniforge,
conda create -n mytraxenv python = 3
创建一个新的conda环境 mytraxenv ,它具有您的Python版本。Conda激活环境,激活mytraxenv
conda intern numpy
和conda安装六个
以确保numpy.six.six
and <代码>车轮mytraxenv
环境。pip install -u pip pip install -u
最后按照以下说明安装
PIP安装 - 升级PIP
pip安装 - 升级“ jax [cpu]”
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]"