Q:

I deleted the site-packages python?

I am using OS X Yosemite 10.10.4.
Previous when I key in
$ python version
The terminal shows 
python version 2.7.2
However, I accidentally deleted the Python.framework. And now when I key in 
$ python version
The terminal shows 
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file 'version': [Errno 2] No such file or directory
Is it my site-packages python deleted? 
What should I do?

A:

python version is not the command you are looking for. Use python --version instead. python version would execute a file with the name version in your current working directory.
In the topic you say that you removed the site-packages directory. In your post you say that you removed the Python.framework. Please correct this in your post.
Python.framework
OSX has two directories of this. One is your main Python installation which sits in /System/Library/Frameworks/Python.framework and one sits in /Library/Frameworks/Python.framework. Only the second directory contains the site-packages directory because this one is more related to local users. Python seems to work on your machine so execute it in your terminal and call the following code to get the correct path:
>>> import site
>>> site.getsitepackages()
'/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/Library/Python/2.7/site-packages']

site-packages
In the worst case you just deleted some third-party libraries which need to be reinstalled. In that case just reinstall the necessary third-party libraries you installed over the time.

