• Stefy Lanza (nextime / spora )'s avatar
    keep this python's native libraries off a foreign interpreter's loader path · de4745f4
    Stefy Lanza (nextime / spora ) authored
    With PYTHONHOME stripped, SadTalker's 3.10 got as far as importing torch and
    died there:
    
        ImportError: /opt/coderai/local-libs/libtorch_python.so:
        undefined symbol: PyObject_GetOptionalAttrString
    
    a CPython 3.13 API. The container launcher exports LD_LIBRARY_PATH as
    /opt/coderai/python/lib:/opt/coderai/local-libs:<the server venv's nvidia
    wheels>, so a child on another python loads THIS one's extension modules --
    the same bug as PYTHONHOME, one layer down, and it hides the same way: by hand
    in the same container the import works, because an interactive shell has none
    of it.
    
    Filtered rather than dropped. An isolated venv ships its own torch and CUDA
    wheels, but a system CUDA or anything the operator put on that path is theirs
    to keep -- and an empty LD_LIBRARY_PATH is not an unset one, it means the
    current directory.
    Co-Authored-By: 's avatarClaude Opus 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_014T3rZnLhydX9QqUcfBbqLu
    de4745f4
test_lipsync_env.py 5.02 KB