[Numpy-discussion] how to uninstall numpy

Scott Sinclair scott.sinclair.za at gmail.com
Tue Aug 7 03:19:40 EDT 2012

On 6 August 2012 20:07, Alex Clark <aclark at aclark.net> wrote:
> On 8/6/12 5:48 AM, Scott Sinclair wrote:
>> On 6 August 2012 11:04, Petro <x.piter at gmail.com> wrote:
>>> This is a general python question but I will ask it here. To
>>> install a new numpy on Debian testing I remove installed version with
>>> "aptitude purge python-numpy" download numpy source code and install
>>> numpy with "sudo python setup.py install".  If I want to remove the installed
>>> numpy how do I proceed?
>> Assuming your system Python is 2.7, your numpy should have been
>> installed in /usr/local/lib/python2.7/site-packages/ (or
>> /usr/local/lib/python2.7/dist-packages/ as on Ubuntu?)
>> So something along these lines:
>> $ sudo rm -rf /usr/local/lib/python2.7/site-packages/numpy/
>> $ sudo rm -rf /usr/local/lib/python2.7/site-packages/numpy-*.egg*
>> $ sudo rm -rf /usr/local/bin/f2py
> Or if you have pip installed (easy_install pip) you can:
> $ pip uninstall numpy
> (it will uninstall things it hasn't installed, which I think should
> include the console_script f2py?)

Unfortunately that won't work in this case. If pip wasn't used to
install the package it has no way know what's been installed. That
information is stored in
"site-packages/package-ver-pyver.egg-info/installed-files.txt" which
doesn't exist if pip isn't used for the install.


More information about the NumPy-Discussion mailing list