0

I am trying to create a secret scope and access key for our Databricks workspace.

In order to achieve this I need to install Databricks Cli on my PC and issue the command databrick configure --token

I have installed Databricks Cli using pip3 install databricks-cli from my cmd prompt

However, whenever I run the command databricks configure --token I get the error message

C:\>databricks configure --token
'databricks' is not recognized as an internal or external command,
operable program or batch file.

Any thoughts?

Alex Ott
  • 80,552
  • 8
  • 87
  • 132
Patterson
  • 1,927
  • 1
  • 19
  • 56
  • Basically, I appear to be doing something wrong either during installation or I'm not running the command from the correct path, because when I enter databricks --version I should get response showing the version number, but just keep on getting 'databricks' is not recognized as an internal or external command – Patterson Apr 20 '21 at 10:19
  • 1
    where it's installed? this path is not in the PATH variable – Alex Ott May 01 '21 at 18:03
  • @AlexOtt, once again you're correct. The path wasn't in the PATH variable. Thanks – Patterson May 03 '21 at 20:05

1 Answers1

0

It can be solved either by : Method 1 - navigating to the directory containing databricks.exe running databricks cli from there. For me it looked like this

Cd C:\Users\<user_name>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Scripts

databricks.exe configure –token

Method 2 :

  1. Edit environment variables
  2. Add a new path to the User Variables. Go to the “Path“ User Variable and hit edit.
  3. Click on new and add the path to where the databricks.exe is located

For me the path looked like this -

%USERPROFILE%\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Scripts

Exit command prompt and try reopening databricks cli. Setting up environment variable worked for me.