[英]M1 mac numpy problems
Using PyCharm to code in python.使用 PyCharm 在 python 中编码。 I set my terminal to be Rosetta simulated and installed Numpy through terminal.我将我的终端设置为 Rosetta 模拟并通过终端安装 Numpy。 Now I can run my Numpy code from inside the terminal, but when I try to compile it inside PyCharm I get and error saying:现在我可以从终端内部运行我的 Numpy 代码,但是当我尝试在 PyCharm 内部编译它时,我得到并错误提示:
* The Python version is: Python3.9 from "/Users/kubab/PycharmProjects/fix/venv/bin/python"
* The NumPy version is: “1.20.3"
ImportError: dlopen(/Users/kubab/PycharmProjects/fix/venv/lib/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-darwin.so, 2): no suitable image found. Did find:
/Users/kubab/PycharmProjects/fix/venv/lib/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-darwin.so: mach-o, but wrong architecture
/Users/kubab/PycharmProjects/fix/venv/lib/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-darwin.so: mach-o, but wrong architecture
If you want to use m1 version just install numpy with miniforge while in non-rosetta terminal:如果您想使用 m1 版本,只需在非 Rosetta 终端中使用 miniforge 安装 numpy:
brew install miniforge
(Replace 'boost' with the anything you want) (用你想要的任何东西替换“提升”)
conda create -n boost
conda activate boost
conda install python=3.9.4
conda install numpy
Then select the miniforge python in M1 PyCharm.然后 select 迷你锻造 python 在 M1 PyCharm。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.