Error path not found

tarun k 280 Reputation points
2025-06-20T04:16:26.35+00:00

We are seeing following error in thein the pipeline

Unable to locate executable file: 'databricks'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable

Azure DevOps
0 comments No comments
{count} votes

Accepted answer
  1. Durga Reshma Malthi 4,165 Reputation points Microsoft External Staff Moderator
    2025-06-20T08:56:30.32+00:00

    Hi tarun k

    If you're using a Linux-based agent, add this step before any databricks commands:

    - script: |
        pip install databricks-cli --upgrade
        databricks --version
      displayName: 'Install Databricks CLI'
    

    To install or upgrade the Databricks CLI tool on an agent with Python already installed, you can use pip.

    If the Databricks CLI is already installed and you want to ensure it is updated to the latest version, you would use

    pip install --upgrade databricks-cli
    

    If the Databricks CLI is not installed, you would use:

    pip install databricks-cli
    

    Since your agent already has Python, just add this:

    - script: |
        pip install databricks-cli
        databricks --version
      displayName: 'Install Databricks CLI'
    

    Additional References:

    https://learn.microsoft.com/en-us/azure/databricks/dev-tools/cli/install

    Hope this helps!

    Please Let me know if you have any queries.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Abiola Akinbade 29,405 Reputation points Volunteer Moderator
    2025-06-20T07:08:08.3066667+00:00

    Hello tarun k,

    Thanks for your question.

    This error means that the Azure DevOps pipeline cannot find the databricks CLI tool in the build agent’s environment.

    You may need to install it. Try these steps in your pipeline.

    steps:
    - task: UsePythonVersion@0
      inputs:
        versionSpec: '3.x'
    
    - script: |
        pip install --upgrade databricks-cli
      displayName: 'Install Databricks CLI'
    
    - script: |
        databricks --version
        # Place your Databricks CLI commands here
      displayName: 'Run Databricks CLI Commands'
    
    

    https://learn.microsoft.com/en-us/azure/databricks/dev-tools/auth/auth-with-azure-devops

    You can mark it 'Accept Answer' and 'Upvote' if this helped you

    Regards,

    Abiola


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.