[issue38705] venv creation on macOS Catalina is failing
Nikhil Benesch 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 <https://bugs.python.org/issue38705> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38705] venv creation on macOS Catalina is failing
Nikhil Benesch added the comment: Oops, sorry, I forgot to actually include the correct command in the workaround. Here it is: $ /usr/bin/python3 -c 'import venv; venv.create("venv2", symlinks=True);' -- ___ Python tracker <https://bugs.python.org/issue38705> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38705] venv creation on macOS Catalina is failing
Nikhil Benesch added the comment: This issue continues to exist with the system Python on macOS. Here is how to reproduce on macOS Catalina 10.15.7 and Xcode 12.1. $ /usr/bin/python3 --version Python 3.8.2 $ /usr/bin/python3 -c 'import venv; venv.create("venv");' $ venv/bin/python3 dyld: Library not loaded: @executable_path/../Python3 Referenced from: /Users/benesch/venv/bin/python3 Reason: image not found Abort trap: 6 Weird, isn't it? The thing that gets copied into the venv is just a totally different file than /usr/bin/python3: $ ls -lah venv/bin/python3 -rwxr-xr-x 1 benesch staff 148K Oct 26 23:16 venv/bin/python3 $ ls -lah /usr/bin/python3 -rwxr-xr-x 1 root wheel 31K Sep 21 20:29 /usr/bin/python3 I assume this is Apple's bug, but I'll be damned if I have to file another report into the blackhole that is radar. If someone needs a quick workaround, just create your venvs with symlinks, which works just fine: $ /usr/bin/python3 -c 'import venv; venv.create("venv2");' $ venv2/bin/python3 Python 3.8.2 (default, Sep 24 2020, 19:37:08) [Clang 12.0.0 (clang-1200.0.32.21)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> Incidentally this is why `/usr/bin/python3 -m venv` works just fine, since it defaults to `symlinks=True` on macOS. -- nosy: +benesch ___ Python tracker <https://bugs.python.org/issue38705> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14776] Add SystemTap static markers
Changes by Nikhil Benesch nikhil.bene...@gmail.com: -- nosy: +benesch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14776 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13405] Add DTrace probes
Changes by Nikhil Benesch nikhil.bene...@gmail.com: -- nosy: +benesch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13405 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21590] Systemtap and DTrace support
Nikhil Benesch added the comment: Since it looks like development on this has stalled, I took the liberty of compiling all prior patches https://github.com/benesch/python-dtrace-tracker and am actively working on merging them into one superpatch. I am neither a Python nor a DTrace expert, so I'm happy to step aside should one of you more experienced folks have something ready. A few thoughts so far: * SPARC support? Can we drop this? It seems to add a bunch of intrusive inlined NOPs—that I'm not sure are even necessary. * @jcea, is this the original DTrace patch? https://github.com/benesch/python-dtrace-tracker/blob/master/dtrace-solaris-oracle-24.patch I'm trying to determine where those NOPs came from. Cheers! -- nosy: +benesch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21590 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com