Using PyCharm to code in python. I set my terminal to be Rosetta simulated and installed Numpy through terminal. 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:
* 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:
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.