Message278649
Changes made to /Library/Python on macOSX Sierra cause the --with-ensurepip compiler flag to fail, and lead to failures of pip after installing Python.
The new file that causes the problem on Sierra is:
/Library/Python/2.7/site-packages/Extras.pth
The current version of site.py reads that .pth file, which results in sys.path containing the path:
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
The latter directory (which is protected by SIP) contains many Python 2.7 packages, including easy_install, setuptools, six, py2app, numpy, pylab and pyOpenSSL. The effect of including this SIP-protected path in sys.path is this: installing or upgrade a package in /Library/Frameworks/Python.framework which is also installed as an "Extra" in the /System/Frameworks/Python.framework will cause pip to attempt to delete the "old" package from its SIP-protected directory, leading to a "Permission Denied" exception and a failed install.
Given that Apple has now tied /Library/Python to the system Python in this way, thereby making a separate Python framework in /Library/Frameworks unusable, the natural solution to this problem would be to stop including any /Library/Python paths in sys.path.
I am attaching a patch that removes the block of code in site.py which adds these paths. |
|
Date |
User |
Action |
Args |
2016-10-14 13:09:00 | Marc.Culler | set | recipients:
+ Marc.Culler |
2016-10-14 13:09:00 | Marc.Culler | set | messageid: <1476450540.6.0.486887198503.issue28440@psf.upfronthosting.co.za> |
2016-10-14 13:09:00 | Marc.Culler | link | issue28440 messages |
2016-10-14 13:08:59 | Marc.Culler | create | |
|