Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Pip uninstall error

📅 2017-Feb-01 ⬩ ✍️ Ashwin Nanjappa ⬩ 📚 Archive


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.


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