Skip to main content

Configure default Python package repositories

Workspace admins can configure private or authenticated package repositories within workspaces as the default pip configuration for serverless notebooks, serverless jobs, and classic compute.

If a workspace is configured with a default Python package repo, users in the workspace will be able to install packages from internal Python repositories without explicitly defining index-url or extra-index-url values. However, if these values are specified in code or in a notebook, they take precedence over the workspace defaults.

This configuration leverages Databricks secrets to securely store and manage repository URLs and credentials. Workspace admins can configure the setup using the workspace admin settings page or using a predefined secret scope and the Databricks CLI secrets commands or the REST API.

Set up default dependencies for a workspace

Workspace admins can add or remove the default Python package repositories using the workspace admin settings page.

  1. As a workspace administrator, log in to the Databricks workspace.
  2. Click your username in the top bar of the Databricks workspace and select Settings.
  3. Click on the Compute tab.
  4. Next to Default Package Repositories, click Manage.
  5. (Optional) Add or remove an index URL, extra index URLs, or a custom SSL certificate.
  6. Click Save to save the changes.
note

Modifications or deletions to secrets are applied after reattaching the compute resource to notebooks or rerunning the jobs.