简体   繁体   中英

Importing the multiarray numpy extension module failed (Just with Anaconda)

I'm quite new to Python/Anaconda, and I'm facing an issue that I couldn't solve on my own or googling. When I'm running Python on cmd I can import and use numpy. Working fine.

When I'm running scripts on Spyder, or just trying to import numpy on Anaconda Prompt this error message appears:

ImportError: Importing the multiarray numpy extension module failed. Most likely you are trying to import a failed build of numpy. If you're working with a numpy git repo, try git clean -xdf (removes all files not under version control). Otherwise reinstall numpy.

Original error was: cannot import name 'multiarray'

I don't know if there are relations to it, but I cannot update conda, as well. When I try to update I receive Permission Errors.

Any ideas?

I feel like I would have to know a little more but, it seems to be that you need to reinstall numpy and check if the complete install was successful. Keep in mind that Anaconda is a closed environment so you don't have as much control.

with regards to the permissions issue you may have installed it with a superuser/admin. That would mean that in order to update you would have to update with your superuser/admin.

以下为我解决了这个问题:

pip install --upgrade --force-reinstall numpy

Kindly perform invalidate cache and restart if you are using PyCharm.

No need to uninstall numpy or run any command.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM