<#20205 `pex_binary` fails to locate `.so` files i...
# github-notifications
c
#20205 `pex_binary` fails to locate `.so` files inside pex, `python_source` works Issue created by tgolsson Describe the bug Users using
pex_binary
together with
torch>=1.13
may encounter weird
_dl_open
errors in relation to CUDA libraries. The same lockfile, same code, works when using
python_source
instead. This indicates that there is some difference in how the pex and/or venv is built between these two cases that causes one to fail unexpectedly. The solution is simply to
import nvidia
before loading torch. For both
packed
and
loose
pex's this seems to cause all nvidia packages to install correctly, and work. This is a huge footgun, because transitive dependencies should be available no matter. I'm going to guess nothing actually imports these packages in
torch
either, as they contain no actual code... only `.so`s. Pants version 2.18 OS Can only occur on Linux. Additional info Runnable repro here: https://github.com/tgolsson/pants-repros/tree/main/torch-2 Slack thread here: https://pantsbuild.slack.com/archives/C046T6T9U/p1700184172636389 pantsbuild/pants