0

trying to run some code in Spyder and encountering this error:

    ImportError: Unable to import required dependencies:
numpy: 

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

    https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  * The Python version is: Python3.9 from "/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9"
  * The NumPy version is: "1.21.2"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: dlopen(/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-darwin.so, 2): no suitable image found.  Did find:
    /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-darwin.so: mach-o, but wrong architecture
    /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-darwin.so: mach-o, but wrong architecture

I have looked at the tips provided in the link above, and perused the web, but can't find a solution.

Note: The Script runs fine in VScode. This only seems to occur in Spyder, which I'm trying to use in particular.

nick_rinaldi
  • 641
  • 6
  • 17
  • Does this answer your question? [Python Pandas - Missing required dependencies \['numpy'\] 1](https://stackoverflow.com/questions/41859939/python-pandas-missing-required-dependencies-numpy-1) – MDR Aug 24 '21 at 22:14
  • Looks like spyder is using the system python installation. If you plan to modify the default spyder python installation, the [spyder docs recommend using conda to manage your pacakges](https://docs.spyder-ide.org/current/installation.html#using-anaconda). Good luck! – Michael Delgado Aug 24 '21 at 22:46
  • I am uninstalling Spyder and reinstalling using Anaconda. I'll try this process out. – nick_rinaldi Aug 25 '21 at 16:29

0 Answers0