Databricks CLI Error databricks-connect' is not recognized

5k Views Asked by At

Databricks CLI worked a year and half ago, when I last worked with it. Since then I have mostly used API. Now, I wanted to use Databricks CLI again (on a new PC) and it does not work.

"The term 'databricks-connect' is not recognized as the name of a cmdlet, function, script file, or operable program"

I have done the following:

  1. Followed https://learn.microsoft.com/en-us/azure/databricks/dev-tools/cli/ and did pip3 install databricks-cli
  2. When I do pip3 install databricks-cli now, I see it says "Requirement already satisfied: databricks-cli in c:\users\username\appdata\roaming\python\python37\site-packages (0.14.3)"
  3. I have set c:\users\username\appdata\roaming\python\python37\site-packages in the path variable Someone mentioned it here: https://learn.microsoft.com/en-us/answers/questions/145963/databricks-cli-not-working-properly.html
  4. When trying to execute databricks-connect -configure, I still get an error saying: "The term 'databricks-connect' is not recognized as the name of a cmdlet, function, script file, or operable program"
  5. I have looked within the site-packages (the same path that I have in path that I mentioned above) and see this structure:

enter image description here

What am I missing?

Even databricks --version does not work.

What is it that I am missing

1

There are 1 best solutions below

3
On BEST ANSWER

You're mixing things - databricks-connect command is from databricks-connect package, the databricks-cli package provides only databricks and dbfs commands.

On Windows the scripts installed by databricks-cli are installed into the Scripts folder under the root of Python installation (I think that it should be c:\users\username\appdata\roaming\python\python37\Scripts in your case). So you need to add it into the PATH environment variable.