0

Good morning.

I removed a python3 module from the installation folder on my pc (in particular "/usr/lib/python3/dist-packages". using sudo rm -r module_name

After doing that I remembered that I could actually use pip3 uninstall module_name

Now, I cannot reinstall the module because pip3 thinks it is already installed. But I cannot either unistall it trough pip3 uninstall module_name because I get the output:

Not uninstalling module_name at /usr/lib/python3/dist-packages, outside environment /usr

Can't uninstall 'module_name'. No files found to uninstall.

My guess is that pip3 has a file where it list all the modules that it saves, so if I modify it I can remove module_name. But I was not able to find it, and I think may causes some other unintentional damage by modifying it.

Do you have any suggestions on how to proceed? Do you know in which file does pip3 store the list of installed modules?

Thank you in advance for your time and patience.

  • 5
    Try [forced reinstall](https://stackoverflow.com/questions/19548957/can-i-force-pip-to-reinstall-the-current-version) followed with `pip3 uninstall` – rochard4u Jul 25 '23 at 14:02
  • Does this answer your question? [How to remove pip package after deleting it manually](https://stackoverflow.com/questions/21306954/how-to-remove-pip-package-after-deleting-it-manually) – NicoCaldo Jul 25 '23 at 15:27
  • Thanks to both of you, I forgot to answer after solving. I followed rochard4u suggestion and it worked! NicoCaldo thank you for the link, I found some interesting info on how pip works anyway! – Biagio Trimarchi Aug 25 '23 at 11:33

0 Answers0