How to remove numpy on MacOSX?

I am on a Mac and I installed numpyand sklearnin that order. Now I came across these errors that have already been mentioned in SO several times:

sklearn "numpy.dtype is the wrong size, try recompiling" in both pycharm and terminal

ValueError: numpy.dtype is the wrong size, try recompiling

ImportError when importing from sklearn: unable to import name check_build

So, I'm trying to fix this error by uninstalling numpyand reinstalling the previous version.

1) sudo pip install --upgrade numpy.. gives a 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 numpyit still works even after restarting the shell.

The only thing I can think of is to manually delete all the files numpythat, on the Mac, can be found in sudo rm -rf /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy

.... but even this gives me a permission error. what gives?

+4
source share
5 answers

To solve this problem, I did the following: (note that it is not entirely clear to me which of these problems has been solved, since I have not tested it completely).

1) Installed python on Python.org instead of Mac dumb version

2) numpy, scipy, matplotlib, sklearn : hash -r python : : __PyCodecInfo_GetIncrementalDecoder, python .

3) , : https://github.com/scipy/scipy/issues/5093. , , scipy, python -m pip install scipy='0.15.0' pip install scipy='0.15.0', , : Can not Python, pip site-packages.

, , , pip, , , python . , , pip python, python -m pip install <package name>.

+3

, MAC OS. , numpy ( MAC- ) .

:

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

.

+20

python brew

brew uninstall numpy

python Mac:

python 2.7

pip uninstall numpy

python 3

pip3 uninstall numpy
+1

, easy_install numpy.

sudo easy_install numpy

0

"anaconda", .

https://conda.io/docs/user-guide/install/macos.html

-1

Source: https://habr.com/ru/post/1652732/


All Articles