I am using MACOS 10.12.6
I was trying to uninstall python to reinstall it, and I foolishly typed these commands into my terminals.
sudo rm -rf /Users/<myusername>/anaconda2/lib/python2.7
sudo rm -rf /Users/<myusername>/anaconda2/lib/python27.zip
sudo rm -rf /Users/<myusername>/anaconda2/lib/python2.7/plat-darwin
sudo rm -rf /Users/<myusername>/anaconda2/lib/plat-mac
sudo rm -rf /Users/<myusername>/anaconda2/lib/plat-mac/lib-scriptpackages
now my Python won't work. I get these errors:
>Could not find platform independent libraries <prefix>
>Could not find platform dependent libraries <exec_prefix>
>Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
And when I try to run python I get things such as
>ModuleNotFoundError: No module named 'pandas'
I currently cannot do anything which requires python
I came to understand much later that what I did was deleting an important part of python files from my computer.
Is there any way I can reinstall python or is formatting my computer the only option if I want to use Python on this computer?