How to correctly uninstall numpy on MacOSX?
<p>I'm on a Mac, and I installed <code>numpy</code> and <code>sklearn</code> in that order.  Now, I'm faced with these errors that have already been mentioned on SO several times:  </p>

<p><a href="http://stackoverflow.com/questions/38197086/sklearn-numpy-dtype-has-the-wrong-size-try-recompiling-in-both-pycharm-and-te">sklearn &quot;numpy.dtype has the wrong size, try recompiling&quot; in both pycharm and terminal</a></p>

<p><a href="http://stackoverflow.com/questions/17709641/valueerror-numpy-dtype-has-the-wrong-size-try-recompiling/18369312#18369312">ValueError: numpy.dtype has the wrong size, try recompiling</a></p>

<p><a href="http://stackoverflow.com/questions/15274696/importerror-in-importing-from-sklearn-cannot-import-name-check-build">ImportError in importing from sklearn: cannot import name check_build</a></p>

<p>So, I try to remediate this error by uninstalling <code>numpy</code>, and reinstalling a previous version.  </p>

<p>1) <code>sudo pip install --upgrade numpy</code>..gives permission error</p>

<p><code>...OSError: [Errno 1] Operation not permitted: '/tmp/pip-OVY0Vq-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy-1.8.0rc1-py2.7.egg-info'...</code></p>

<p>2)  I tried <code>brew uninstall numpy</code>, but <code>import numpy</code> still works even after a shell restart.</p>

<p>The only thing left I can think of is to manually delete all of the <code>numpy</code> files, which, on a Mac seeem to be found under 
<code>sudo rm -rf /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy</code></p>

<p>....but even that gives me a permission error.  what gives?  </p>

<p>If you're using the brew version of python</p>

<pre><code>brew uninstall numpy
</code></pre>

<p>If you're using the mac version of python:</p>

<p>python 2.7</p>

<pre><code>pip uninstall numpy
</code></pre>

<p>python 3</p>

<pre><code>pip3 uninstall numpy
</code></pre>

python osx python-2.7 numpy