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.
- As a workspace administrator, log in to the Databricks workspace.
- Click your username in the top bar of the Databricks workspace and select Settings.
- Click on the Compute tab.
- Next to Default Package Repositories, click Manage.
- (Optional) Add or remove an index URL, extra index URLs, or a custom SSL certificate.
- Click Save to save the changes.
Modifications or deletions to secrets are applied after reattaching the compute resource to notebooks or rerunning the jobs.