Pip uninstall error

Problem

I had installed a package using Pip. However, when I tried to uninstall it, I got this error:

$ sudo pip uninstall h5py
Can't uninstall 'h5py'. No files were found to uninstall.

Solution

You first want to make sure that you are using the pip version that matches the package. That is, if you installed a Python 2.x package, that can only be uninstalled using pip. A Python 3.x package can only be uninstalled using pip3.

In my case, I could not discover the real reason for this error, I resorted to finding the deleting the installed directory for this package. I found the directory h5py-2.6.0-py2.7.egg-info under /usr/local/lib/python2.7/dist-packages and deleted that. If this was a Python 3.x package, I would similarly have looked under the /usr/local/lib/python3.x/ directory.

Tried with: Ubuntu 14.04

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s