在 M1 上安装变压器可以得到 jax

问题描述 投票:0回答:1

我是 Python 新手,并尝试按照说明安装变压器 here

我完成了所有步骤,但是当我到达时

python -c“从变压器导入管道; print(pipeline('情感分析')('我们爱你'))"

我得到了

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.

所以我重新安装并安装了:

pip uninstall jax jaxlib
pip install --upgrade jax jaxlib

并得到完全相同的错误

现在我在这个链接

并做到了这一点:

pip install numpy wheel build

但我无法运行下一行

python build/build.py
pip install dist/*.whl  # installs jaxlib (includes XLA)

因为我正在

python: can't open file '/Users/e5028514/build/build.py': [Errno 2] No such file or directory

天哪,我怎样才能得到我的变形金刚?

我的Mac是

python conda huggingface-transformers
1个回答
0
投票

该链接告诉您首先要

git clone
jax 存储库。这就是为什么您会收到“没有这样的文件或目录”错误的原因。

© www.soinside.com 2019 - 2024. All rights reserved.