I'm on El Capitan and I want to install numpy with pip. However I get the following error:
Detected a distutils installed project ('numpy') which we cannot uninstall. The metadata provided by distutils does not contain a list of files which have been installed, so pip does not know which files to uninstall.
The existing numpy version seems to be 1.10.4 and the one I try to install is 1.9.2, but I need it. Is there a way to uninstall this version with distutils? Or at least any way to tell pip that there is numpy installed?
Since there is no metadata about the installed files, I found the easiest way to be removing the files manually. Simply retrieve the directory of the module (I referred to this: Retrieving python module path), and delete the folder, as well as the accompanying .egg-info file. Then install your desired numpy version without the --update flag.
It might be that your item was installed with anaconda. For your numpy, Try:
conda uninstall numpy
I got the same error, and this fixed it for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With