谁能给我一份在 M1 Mac 上安装 tensorflow-federated 的综合指南?

发布于 2025-01-21 03:49:24 字数 546 浏览 0 评论 0 原文

我遵循官方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.

如何解决这个问题?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

北城挽邺 2025-01-28 03:49:25

使用〜/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,

  • Create a new conda environment mytraxenv with conda create -n mytraxenv python=3 which has your python version.
  • Activate the environment with conda activate mytraxenv
  • run conda install numpy and conda install six to ensure numpy.six and wheel in mytraxenv environment.
  • Then pip install -U pip pip install -U

Lastly follow these instructions to install
pip install --upgrade pip
pip install --upgrade "jax[cpu]"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文