How to correctly uninstall numpy on MacOSX?

I also getting this when I try to install pandas in MAC, but following command help me to get work around. Following command will ignore any previously installed version. Not sure it really fix issue behind though, but you can also have a try:

sudo pip install numpy --ignore-installed numpy

To solve this, I did the following: (note that it is not entirely clear to me which of these solved the problem, since I didn't test thoroughly).

1) Installed python at Python.org instead of Mac's stupid version

2) re-installed all of the modules like numpy, scipy, matplotlib, sklearn and ran this:hash -r python according to this source: Symbol not found: __PyCodecInfo_GetIncrementalDecoder, because it doesn't make python use the cached versions of the modules.

3) Then, I realized that I had this issue: https://github.com/scipy/scipy/issues/5093. To solve it, I had to make sure I installed the scipy module using python -m pip install scipy='0.15.0' instead of just pip install scipy='0.15.0', because this solved the issue based on this source: Can't load Python modules installed via pip from site-packages directory.

So, in conclusion it turns out there really is a big different between what is installed by pip, and what is imported when python is executed from the terminal. So, to ensure that you are using the pip to install the modules into a particular python, you can use python -m pip install <package name>.


I guess you are using MAC OS. I did a workaround to ignore the existing version of numpy (which MAC won't let you uninstall), and install an upgraded version.

Command :

pip install --upgrade --ignore-installed --install-option '--install-data=/usr/local' numpy

Worked fine for me.