I updated my computer today, and am getting the following error message when I attempt to import pandas:
import pandas as pd
AttributeError: module \
Have you tried this:
pip uninstall -y numpy
pip uninstall -y setuptools
pip install setuptools
pip install numpy
I had this error today while I was running a "brew upgrade" on MacOS and upgrade failed on matplotlib.
<TLDR/>
I run pip (v 2.x) and pip3 installed. It turned out I had not installed numpy with pip3. I ran
pip3 install numpy
brew upgrade then ran successfully.
You may have named your program/script 'numpy'. I also had that then i renamed my program and then it works. It happens because when you name your program similar to a module the import attribute clashes between programs and modules
In Jupyter notebook first uninstall the existing numpy by using !pip uninstall numpy.
Then install it !pip install numpy. Now restart the kernel(Python Notebook). It will work.
Just had this issue after conda chose to update numpy from 1.13.3 to 1.14.3. Reverting numpy via procedure in http://blog.rtwilson.com/conda-revisions-letting-you-rollback-to-a-previous-version-of-your-environment/ sufficed to recover functionality, followed by pinning the version in the environment.