Nikhil Benesch <nikhil.bene...@gmail.com> added the comment:

So it looks like /usr/bin/python3 is just a shim that immediately execs the 
real Python binary:

    
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/bin/python3

This binary is identical to the one that ends up in the venv.

Problematically, this binary is dynamically linked, and links the "Python3" 
shared library using a relative path:

$ otool -L 
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/bin/python3
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/bin/python3:
        @executable_path/../Python3 (compatibility version 3.8.0, current 
version 3.8.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current 
version 1292.0.0)

So obviously copying that binary to a different path breaks the 
@executable_path-relative link. Ah, well. Definitely seems like Apple's bug. 
Not sure there is anything that even could be done on the CPython side.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38705>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to