Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OS X Uninstall a distutils installed project

Tags:

python

macos

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?

like image 944
riasc Avatar asked Jan 18 '16 14:01

riasc


2 Answers

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.

like image 100
Max Avatar answered Nov 01 '22 00:11

Max


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.

like image 40
AnneTheAgile Avatar answered Nov 01 '22 00:11

AnneTheAgile