cancel
Showing results for 
Search instead for 
Did you mean: 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
cancel
Showing results for 
Search instead for 
Did you mean: 

You haven't configured the CLI yet

ram0021
New Contributor II

I have coded pyfunc model code in Databricks notebook and deployed and served thr model thr endpoint. I tried to query the endpoint thr databricks notebook itself through below code but getting CLI error. Not sure why i am getting this error since I am querying thr code in databricks notebook itself.

{"error_code": "BAD_REQUEST", "message": "Encountered an unexpected error while evaluating the model. Error 'You haven't configured the CLI yet! Please configure by entering `/opt/conda/envs/mlflow-env/bin/gunicorn configure`'",/site-packages/mlflow/legacy_databricks_cli/configure/provider.py\", line 137, in get_config\n raise InvalidConfigurationError.for_profile(None)\nmlflow.legacy_databricks_cli.configure.provider.InvalidConfigurationError: You haven't configured the CLI yet! Please configure by entering `/opt/conda/envs/mlflow-env/bin/gunicorn configure`\n"}

2 REPLIES 2

ram0021
New Contributor II

I have even used %pip but still same error.

Kaniz_Fatma
Community Manager
Community Manager

Hi @ram0021, It looks like the Databricks CLI is not properly configured in your Databricks Notebook environment. 

  1. Open a terminal or command prompt on your local machine (not the Databricks Notebook).
  2. Run the following command to configure the Databricks CLI:
    /opt/conda/envs/mlflow-env/bin/gunicorn configure .
    This command should guide you through the process of configurng the Databricks CLI.
  3. Once the configuration is complete, try running your code in the Databricks notebook again.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group