2

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!

Addison
  • 403
  • 8
  • 24

2 Answers2

2

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 "{}" \;

  • what do you mean by 'Move python to trash'? Like there are a lot of python associated files on my computer. I have the .pkg for when I downloaded python 3.6, but I have files related to python 2.7 (which I no longer use or want to have on my computer) Will that type of stuff be covered by the terminal command? Also is there some way I can share my directories with you so you can see the issues I have (any potentially try to fix them?) or would it be too much effort, making deleting the best course of action? – Addison Jul 09 '18 at 01:13
  • 1
    Here is a link to a picture, where you can see how to move python to the trash: [link](https://snag.gy/1UudHN.jpg) and to remove Python 2.7: https://stackoverflow.com/questions/3819449/how-to-uninstall-python-2-7-on-a-mac-os-x-10-6-4 –  Jul 09 '18 at 01:23
  • so I actually put a couple of things from /usr/bin into the trash (which after reading the first couple lines of the post you linked, made it clear that I should have not done that). Here are the files: https://snag.gy/F3wmVP.jpg. Is it safe to assume I should put them back? Also I am assuming if I right click and press 'put back' it will return them to their correct locations right? – Addison Jul 09 '18 at 18:30
  • actually I think it was /usr/local/bin ** – Addison Jul 09 '18 at 18:55
1

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.

Addison
  • 403
  • 8
  • 24