I'm on a Mac, and I installed numpy
and sklearn
in that order. Now, I'm faced with these errors that have already been mentioned on SO several times:
sklearn "numpy.dtype has the wrong size, try recompiling" in both pycharm and terminal
ValueError: numpy.dtype has the wrong size, try recompiling
ImportError in importing from sklearn: cannot import name check_build
So, I try to remediate this error by uninstalling numpy
, and reinstalling a previous version.
1) sudo pip install --upgrade numpy
..gives permission error
...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'...
2) I tried brew uninstall numpy
, but import numpy
still works even after a shell restart.
The only thing left I can think of is to manually delete all of the numpy
files, which, on a Mac seeem to be found under
sudo rm -rf /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy
....but even that gives me a permission error. what gives?