Closed paolostancato closed 5 months ago
Hello @paolostancato Thank you for creating this issue. We will investigate it and get back to you as soon as we have some feedback.
Hello @paolostancato, the gcc compiler is looking for the Python.h file in the directory specified by /opt/hostedtoolcache/Python/3.11.9/x64/include/python3.11, but the file is actually located in /home/runner/_work/_tool/Python/3.11.9/x64/include/python3.11. This discrepancy could be due to a misconfiguration of the environment variables . The AGENT_TOOLSDIRECTORY and RUNNER_TOOL_CACHE should be set such that they point to the correct directories where the necessary tools and files are located. The RUNNER_TOOL_CACHE is a predefined environment variable in GitHub Actions runners that directs to a directory for caching tools and dependencies, facilitating reuse across workflow runs. This is elaborated in the default environment variables documentation. For self-hosted runners on Linux and Windows, the AGENT_TOOLSDIRECTORY environment variable allows the specification of a custom directory for tool installations and caching, as detailed in the advanced usage documentation. When you designate a custom directory with AGENT_TOOLSDIRECTORY, the RUNNER_TOOL_CACHE no longer defaults to the runner's preset directory. One of the possible workaround is mentioned below In a self-hosted runner setup on Kubernetes, we might need to adjust the setup to ensure that these environment variables are correctly set. This could involve modifying the runner's configuration or adjusting the Kubernetes deployment to correctly mount the necessary directories.
spec: template: spec: containers:
Hello @paolostancato, Please confirm the above information resolved the issue.
Hi @aparnajyothi-y , thanks for your prompt response, I'll close the issue because I couldn't reproduce it again
Description: (Possibly related to #824?)
Context: Runners are self hosted on kubernetes. When installing packages with pip that require building, gcc is not able to find
Python.h
apparently because it's looking at the wrong path:Include directory is set to
while
Python.h
resides insetup-python.log
Action version: actions/setup-python@v5' (SHA:82c7e631bb3cdc910f68e0081d67478d79c6982d)
Platform:
Runner type:
Tools version:
Repro steps: