Numpy Import Throws Attributeerror: 'module' Object Has No Attribute 'core'
import numpy as np File '/home/anirrudh/.virtualenvs/ml4t2/local/lib/python2.7/site-packages/numpy/__init__.py', line 180, in from . import add_newdocs File
Solution 1:
Try running it in Python 2 instead of Python 3 - you may have the older version of Spark
Solution 2:
This happened to me in Windows with Anaconda. I fixed it by removing the python3 path from the environment variable PATH
.
Solution 3:
Another common problem here (which I had)...check to make sure you dont have a PYTHONPATH env var pointing to a different version of python site-packages (this happened because I updated my python version and didn't change this...it loads from PYTHONPATH first).
Solution 4:
It happened to me in a specific ipynb, once I crated a copy of the notebook with a different name I was able to import numpy.
Post a Comment for "Numpy Import Throws Attributeerror: 'module' Object Has No Attribute 'core'"