【发布时间】:2021-07-10 12:50:17
【问题描述】:
对于 python 3.8.8 和使用新的 mac air(带有 m1 芯片),在 jupyter 笔记本和 python 终端中,import jax 会引发此错误
Python 3.8.8 (default, Apr 13 2021, 12:59:45)
[Clang 10.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import jax
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/steve/Documents/code/jax/jax/__init__.py", line 37, in <module>
from . import config as _config_module
File "/Users/steve/Documents/code/jax/jax/config.py", line 18, in <module>
from jax._src.config import config
File "/Users/steve/Documents/code/jax/jax/_src/config.py", line 26, in <module>
from jax import lib
File "/Users/steve/Documents/code/jax/jax/lib/__init__.py", line 63, in <module>
cpu_feature_guard.check_cpu_features()
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.
我怀疑是因为 m1 芯片造成的。
我尝试将 jax 与 pip install jax 一起使用,然后按照评论的建议从源代码构建它,方法是克隆他们的存储库并按照 here 给出的说明进行操作,但显示相同的错误消息。
【问题讨论】:
标签: python python-3.8 apple-m1 jax