Giter Club home page Giter Club logo

Comments (7)

damccorm avatar damccorm commented on May 18, 2024

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 .../_work/tools is the default tools directory when none is found so my guess is that its being lost before then

from azure-pipelines-tool-lib.

stephenmichaelf avatar stephenmichaelf commented on May 18, 2024

Closing due to inactivity. Please reopen with additional information.

from azure-pipelines-tool-lib.

majorvin avatar majorvin commented on May 18, 2024

When I do ls im getting these fiiles instead.

/var/lib/waagent/custom-script/download/1/agent/_work/_tool
helm
kubectl

but doing it on the server is pointing to the right folders where I can see python, ruby and pypy

from azure-pipelines-tool-lib.

dave-ops avatar dave-ops commented on May 18, 2024

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

from azure-pipelines-tool-lib.

majorvin avatar majorvin commented on May 18, 2024

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.

from azure-pipelines-tool-lib.

ionutleca avatar ionutleca commented on May 18, 2024

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 .env file should solve your issue.

from azure-pipelines-tool-lib.

AlexChongMicrosoft avatar AlexChongMicrosoft commented on May 18, 2024

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 .env file should solve your issue.

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
##[debug]addToPath=true
##[debug]architecture=x64
##[debug]Semantic version spec of 3.7 is 3.7
##[debug]isExplicit: null
##[debug]explicit? false
##[debug]Agent.Version=2.165.2
##[debug]Agent.ToolsDirectory=/home/vmasuser/myagent/_work/_tool
##[debug]isExplicit: 3.7.7
##[debug]explicit? true
##[debug]evaluating 0 versions
##[debug]match not found
##[debug]Agent.Version=2.165.2
##[debug]Agent.ToolsDirectory=/home/vmasuser/myagent/_work/_tool
##[debug]isExplicit: 3.7.7
##[debug]explicit? true
##[debug]Agent.Version=2.165.2
##[debug]Agent.ToolsDirectory=/home/vmasuser/myagent/_work/_tool
##[debug]isExplicit: 3.7.7
##[debug]explicit? true
##[debug]Agent.ToolsDirectory=/home/vmasuser/myagent/_work/_tool
##[debug]task result: Failed
##[error]Version spec 3.7 for architecture x64 did not match any version in Agent.ToolsDirectory.
Versions in /home/vmasuser/myagent/_work/_tool:

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.
If this is a self-hosted agent, see how to configure side-by-side Python versions at https://go.microsoft.com/fwlink/?linkid=871498.

from azure-pipelines-tool-lib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.