With my Mac M1 machine, I wish to use IPython Kernels in coding softwares like VSCode and Spyder, but when importing NumPy from those Kernels, I get the following Error :
Original error was: dlopen(/PATHTOLIBRARY/Python/3.9/lib/python/site-packages/numpy/core/_multiarray_umath.cpython-39-darwin.so, 0x0002): tried: '/PATHTOLIBRARY/Python/3.9/lib/python/site-packages/numpy/core/_multiarray_umath.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have (arm64), need (x86_64)))
The problem seems to be associated with IPython kernels because when running the respective .py scripts on the terminal, there is no such issue.
I uploaded below a screenshot of the problem: The code (left) works on the terminal (bottom), but not on the interactive window (right).
I have seen quite a few links about this kind of issue (see below), none of which worked for me. In special, I wouldn't like to install conda on my machine.
https://github.com/nteract/hydrogen/issues/2147
https://github.com/quarto-dev/quarto-cli/issues/1133
mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64') in Flutter