小编new*_*mer的帖子

无法使用 pip3 在 m1 mac 上安装带有 python3 的 matplotlib

我无法在 M1 Mac 上通过 pip 安装 matplotlib。我通过 Homebrew 安装了 Python 3.9.1。我在这里尝试了解决方案:Pip install matplotlib 在 M1 Mac 上失败,但它对我不起作用。

我得到这个长错误:

ImportError: dlopen(/opt/homebrew/lib/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-darwin.so, 2): no suitable image found.  Did find:
    /opt/homebrew/lib/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-darwin.so: mach-o, but wrong architecture
    /opt/homebrew/lib/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-darwin.so: mach-o, but wrong architecture

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/private/tmp/pip-install-mrz7uc56/matplotlib_20151701613b4e6fb6955488fa89e81e/setup.py", line 256, in <module>
    setup(  # Finally, pass this all along to distutils to do the heavy lifting.
  File …
Run Code Online (Sandbox Code Playgroud)

pip matplotlib python-3.x apple-m1

1
推荐指数
1
解决办法
2733
查看次数

标签 统计

apple-m1 ×1

matplotlib ×1

pip ×1

python-3.x ×1