New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't find PythonVersion on self hosted ubuntu image #57
Comments
Ok, so to be precise, the issue here is that AGENT_TOOLSDIRECTORY is set to one thing, but Agent.ToolsDirectory is getting set to something else? In theory that shouldn't happen. To help diagnose - in your pipeline, before your usePythonVersion step, could you add a script to echo AGENT_TOOLSDIRECTORY? That should help us determine where exactly this issue is coming from. I believe that |
Closing due to inactivity. Please reopen with additional information. |
When I do
but doing it on the server is pointing to the right folders where I can see python, ruby and pypy |
Not all python versions are available on all images. If you go to this link, click on the Available Software for the Image you are using, it will list all the software versions on your image. For example: if you are running Ubuntu 16.04 or Ubuntu 18.04 the only 3.6.x version of python available to you is 3.6.9 https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops#software |
Hi @dave-ops we are talking about self hosted. and definitely I can confirm that 3.7.* and 3.8.* are all in toolscache folder. |
Hi. If your agent is started as a service, it will not be aware of the AGENT_TOOLSDIRECTORY environment variable you set. https://github.com/microsoft/azure-pipelines-agent/blob/master/docs/start/nixsvc.md#setting-the-environment Adding it to the |
Hi, from the pipeline log, I find that the env is already be recognized. But I still meet this issue. The log is below. ##[debug]versionSpec=3.7 If this is a Microsoft-hosted agent, check that this image supports side-by-side versions of Python at https://aka.ms/hosted-agent-software. |
Hi,
I've built an image using Packer, cloning and following the instructions from azure pipelines image generation. The build succedeed and then I deployed a VM with that. I then assigned the VM as a build agent, so far there's no problems, but when I run a UsePythonVersion task the tool doesn't find the installed versions.
Following overview, the env variable AGENT_TOOLSDIRECTORY should overwrite the default
_work/tools
path, but it seems that this is not happening.In the VM I can run
echo $AGENT_TOOLSDIRECTORY
and the result is/opt/hostedtoolcache
(as expected), but when I run the pipeline with debug info, the variable Agent.ToolsDirectory keeps reading.../_work/tools
I guess if there's some other configuration step required to make this work
The text was updated successfully, but these errors were encountered: