proud-policeman-38871
11/07/2024, 8:26 AMhome/runner/_work/_tool/Python/3.12.7/x64/bin/python3.12: error while loading shared libraries: libpython3.12.so.1.0: cannot open shared object file: No such file or directory
I think this is related to https://github.com/actions/setup-python/issues/871
Are there any accepted solutions beyond the workaround in that ticket to do this that people are using?
We have the following in pants.toml
[python]
interpreter_constraints = ["==3.12.*"]
pants lint ::
in CI is failing with
Error: 2.79 [ERROR] 1 Exception encountered:
Engine traceback:
in `lint` goal
ProcessExecutionFailure: Process 'Find interpreter for constraints: CPython==3.12.*' failed with exit code 102.
stdout:
stderr:
Could not find a compatible interpreter.
Examined the following working interpreters:
1.) /usr/bin/python3.10 CPython==3.10.12
Skipped the following broken interpreters:
1.) /home/runner/_work/_tool/Python/3.12.7/x64/bin/python3.12:
/home/runner/_work/_tool/Python/3.12.7/x64/bin/python3.12: error while loading shared libraries: libpython3.12.so.1.0: cannot open shared object file: No such file or directory
fast-nail-55400
11/07/2024, 8:33 AMfast-nail-55400
11/07/2024, 8:34 AMfast-nail-55400
11/07/2024, 8:35 AMproud-policeman-38871
11/07/2024, 8:35 AMfast-nail-55400
11/07/2024, 8:38 AMfast-nail-55400
11/07/2024, 8:39 AMfast-nail-55400
11/07/2024, 8:39 AMproud-policeman-38871
11/07/2024, 8:41 AMAlso, you are using a self-hosted runner, could you not just setup the various Python versions in your own runner's image?I might have to resort to that.
fast-nail-55400
11/07/2024, 8:43 AMfast-nail-55400
11/07/2024, 8:44 AMthat fix has been sitting for 5 months - I'm not optimistic it's ever getting merged.😞
acceptable-guitar-70265
11/07/2024, 11:50 AMsetup-python
action.
Adding the following to my pants.toml
allowed the required environment variable to propagate through to the pants processes:
[subprocess-environment]
env_vars = ["LD_LIBRARY_PATH"]
dazzling-pizza-75442
11/07/2024, 1:12 PMAGENT_TOOLSDIRECTORY=/opt/hostedtoolcache
and/or RUNNER_TOOL_CACHE=/opt/hostedtoolcache
so that the self-hosted runner matches the hosted runner config?proud-policeman-38871
11/07/2024, 1:52 PMenv:
AGENT_TOOLSDIRECTORY: /opt/hostedtoolcache
Setup Python fails with Error: mkdir: cannot create directory '/opt/hostedtoolcache': Permission denied
I can add a previous step to create this and chown it to root, and setup python then succeeds. But I don't understand the potential security concerns having done this.
- name: Create directory and set permissions
run: |
sudo mkdir -p /opt/hostedtoolcache
sudo chmod -R 777 /opt/hostedtoolcache