Trying to help a coworker get a package to run, ho...
# general
m
Trying to help a coworker get a package to run, however, we are getting this error:
.python-build-standalone/565e218aaa9203a5adbf01a6fbfbe60913c958a9b14b3d80de3c2ee3b8621643/bin/python3: error while loading shared libraries: /pants-named-caches/python_build_standalone/565e218aaa9203a5adbf01a6fbfbe60913c958a9b14b3d80de3c2ee3b8621643/bin/../lib/libpython3.9.so.1.0: cannot open shared object file: No such file or director
This is from running this target:
Copy code
pex_binary(
    **{
        "entry_point": "query_engine/gateway/server.py:sync_main",
        "environment": "python_3_10",
        "execution_mode": "venv",
        "interpreter_constraints": ["==3.10.*"],
        "layout": "packed",
        "name": "query_gateway_pex",
        "tags": ["python_3_10"],
    }
)
c
the pex_binary is targeting python3.10, but the error is for python3.9, so I think that might be the Pants internal one for running pex. I wonder if the cache is broken somehow? you can try removing the cache and having it rebuild. Usually that's
rm -r ~/.cache/pants
, although you can try just the named cache with
rm -r ~/.cache/pants/named_caches
r
I just ran into to this too nuking cache did not help
c
is that with all pex targets or just a subset? I wonder if it has to do with the python interpreter that's running Pants
r
It definitely some related to one running pants. But this happens to me when I'm packaging a docker image that depends on a pex target
I can actually run the pex target just fine