Addison
Addison

Reputation: 423

Wondering how I can delete all of my python related files on Mac

So I was trying to install kivy, which lead me to install pip, and I went down a rabbit hole of altering directories. I am using PyCharm for the record.

I would like to remove everything python related (including all libraries like pip) from my computer, and start fresh with empty directories, so when I download pycharm again, there will be no issues.

I am using a Mac, so if any of you could let me know how to do that on a Mac, it would be greatly appreciated.

Could I just open finder, search python, and delete all of the files (there are tons) or would that be too destructive? I hope I am making my situation clear enough, please comment any questions to clarify things.

Thanks!

Upvotes: 2

Views: 2041

Answers (2)

Addison
Addison

Reputation: 423

Found this answer: https://askubuntu.com/questions/1025189/pip-is-not-working-importerror-no-module-named-pip-internal/1026848?newreg=64574707bd3540948f5c54ec80d2b371

Force reinstalling seemed to work. Kivy and pip are now working!

Note: The issue I had was, I BELIEVE, that I had messed with my pip directory (as in where pip was located) and had tried installing too many times. Force reinstall I imagine deleted unnecessary pip files and reinstalled a cleaner version.

Upvotes: 1

user10051040
user10051040

Reputation:

If you are familiar with the Terminal app, you can use command lines to uninstall Python from your Mac. For this, follow these steps:

  1. Move Python to Trash.
  2. Open the Terminal app and type the following command line in the window: ~ alexa$ sudo rm -rf /Applications/Python\ 3.6/
  3. It will require you to enter your administrator password to confirm the deletion.

And for the PyCharm:

Just remove the ~/Library/Caches/PyCharm20 and ~/Library/Preferences/PyCharm20 directories.

Or if that won't be enough:

  1. Go to Applications > right click PyCharm > move to trash

  2. open a terminal and run the following: find ~/Library/ -iname "pycharm"

  3. verify that all of the results are in fact related to PyCharm and not something else important you need to keep. Then, remove them all using the command: find ~/Library -iname "pycharm" -exec rm -r "{}" \;

Upvotes: 2

Related Questions