![]() Numpy works in regular python scripts but not in the notebook. Original error was: dlopen(/Users/zhengxianwangMac/Infinitus/.venv/lib/python3.10/site-packages/numpy/core/_multiarray_, 0x0002): tried: '/Users/zhengxianwangMac/Infinitus/.venv/lib/python3.10/site-packages/numpy/core/_multiarray_ ' (mach-o file, but is an incompatible architecture (have 'arm64 ', need 'x86_64 ')), '/usr/lib/_multiarray_ ' (no such file) Additional information: ![]() Please carefully study the documentation linked above for further help. We have compiled some common reasons and troubleshooting tips at: Please note and check the following: * The Python version is: Python3.10 from "/Users/zhengxianwangMac/Infinitus/.venv/bin/python" * The NumPy version is: "1.22.3" and make sure that they are the versions you expect. This error can happen for many reasons, often due to issues with your setup or how NumPy was installed. import compat File ~/Infinitus/.venv/lib/python3.10/site-packages/numpy/core/_init_.py:49, in 25 import sys 26 msg = """ 27 28 IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE! (.) 47 """ % (sys.version_info, sys.version_info, sys.executable, 48 _version_, exc) -> 49 raise ImportError(msg) 50 finally: 51 for envkey in env_added: ImportError: IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE! Importing the numpy C-extensions failed. File ~/Infinitus/.venv/lib/python3.10/site-packages/numpy/_init_.py:144, in 141 # Allow distributors to run custom init code 142 from. Users/zhengxianwangMac/Infinitus/test.ipynb Cell 1 ' in () 1 print("hi") -> 3 import matplotlib.pyplot as plt 4 import numpy as np 6 x = np.linspace(0, 20, 100) # Create a list of evenly-spaced numbers over the range File ~/Infinitus/.venv/lib/python3.10/site-packages/matplotlib/_init_.py:104, in 101 import tempfile 102 import warnings -> 104 import numpy 105 from packaging.version import parse as parse_version 107 # cbook must import matplotlib only within function 108 # definitions, so it is safe to import from it here. ![]() ImportError: dlopen(/Users/zhengxianwangMac/Infinitus/.venv/lib/python3.10/site-packages/numpy/core/_multiarray_, 0x0002): tried: '/Users/zhengxianwangMac/Infinitus/.venv/lib/python3.10/site-packages/numpy/core/_multiarray_ ' (mach-o file, but is an incompatible architecture (have 'arm64 ', need 'x86_64 ')), '/usr/lib/_multiarray_ ' (no such file)ĭuring handling of the above exception, another exception occurred: To install numpy, select pip from the dropdown for Python Environment, then type numpy and click on the install numpy from PyPI as shown below. > 6 from re._multiarray_umath import (ħ add_docstring, implement_array_function, _get_implementing_args)Ĩ from pat._inspect import getargspec ImportError Traceback (most recent call last)įile ~/Infinitus/.venv/lib/python3.10/site-packages/numpy/core/_init_.py:23, in įile ~/Infinitus/.venv/lib/python3.10/site-packages/numpy/core/multiarray.py:10, in įile ~/Infinitus/.venv/lib/python3.10/site-packages/numpy/core/overrides.py:6, in
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |