Python 'site.py' quit after updating Yosemite. Things are good?

The Yosemite update (OS X 10.10) includes Python 2.7.6, and the process, as usual, with the Apple system update, seems to completely replace the system package directory, in

/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python 

This time the process seems to be completely omitted by site.py I realized that this file is essential for the functioning of Python , in particular, the proper construction of package search paths; but my Python (which uses nothing more than the Apple Python system and additional packages in site-packages ) works fine, and my paths remain the same as before the upgrade.

Is site.py no longer needed for Python to function properly? Has he moved to another place?

+1
source share
2 answers

site.py is still in use. You just don’t look at the right place:

 >>> import site >>> print site.__file__ /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.pyc 

The /Extras framework seems to be entirely composed of non-standard library packages, for example. packages that Apple installs for its own purposes, which are not part of standard Python.

If there was a site.py file in previous versions of OS X, it was most likely one installed by setuptools ; from 10.10 comes setuptools 1.1.6, which has long since gotten rid of the hack embodied in this file.

+2
source

If the behavior of python has not changed and sys.path contains the path to your site-packages folder, you should be fine. If you use the -S interpreter, the path to the site-packages folder will not appear in sys.path , so you can test it. I would recommend looking for a file on your system. If it does not appear, make sure that you see hidden files in case it is hidden for some reason.

site.py docs

edit: Solved in the comments, but wants to provide an official answer.

+1
source

All Articles