Reputation: 101
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?
Upvotes: 10
Views: 10490
Reputation: 213
Kindly perform invalidate cache and restart if you are using PyCharm.
No need to uninstall numpy or run any command.
Upvotes: 0
Reputation: 3700
The following solved this issue for me:
pip install --upgrade --force-reinstall numpy
Upvotes: 3
Reputation: 9
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.
Upvotes: 0