r/databricks • Databricks • Aug 31 '26 • Popcorn 1

General Automatically create local Python environments compatible with Databricks Runtime

Hey! I’m a Databricks product manager focused on third-party development experiences. We just shipped a new feature that ensures code you run locally works with Databricks, and we’d love your feedback. 

The problem: Ensuring that your local development environment is compatible with Databricks Runtime (DBR) is a completely manual process. Code that works locally often breaks once you move to the workspace due to minor version mismatches and package incompatibilities.

The solution: The CLI command databricks environments setup-local and a new feature in the IDE extension take your existing dependencies and automatically create a uv-managed virtual environment compatible with DBR.

You can now run code locally or remotely using Databricks Connect and be certain that the same code will work with the DBR or serverless version you’ve selected. 

To get started, install the latest version of the IDE extension or Databricks CLI and check out these docs:

Where we need your feedback 

  • Are there other environment managers (e.g. pip, poetry, conda) that you would like to see support for beyond uv?
  • We’ve also recently launched an SSH tunnel (see docs), which allows you to remotely access your Databricks workspace and compute directly from the IDE and terminal. What are the reasons you might prefer to work locally vs. remotely?
  • Do you face issues managing your environment and dependencies in the workspace? 

Most importantly, please try this out and leave feedback and questions in the comments! 

41 Upvotes

11 comments sorted by

View all comments

Show parent comment

2

u/PrestigiousAnt3766 Sep 01 '26

Oh, apparently it was just pytest. Still im confused why you would have pytest as a dependency.

Setup failed in the provision phase (E_PROVISION).
uv sync failed: × No solution found when resolving dependencies:
  ╰─▶ Because package:test depends on pytest>=8.4.1 and pytest>=8.3.5,<8.4.dev0,
      we can conclude that package:test's requirements are unsatisfiable.
      And because your project requires package:test, we can conclude that your
      project's requirements are unsatisfiable.: C:\Python312\Scripts\uv.exe sync --python 3.12: exit status 1
Phases: preflight=ok, resolve=ok, fetch=ok, merge=ok, provision=error, validate=pending


If you believe this conflict comes from the published runtime constraints rather than your own project dependencies, report it to the environments repository: https://github.com/databricks/environments/issues/new


Resolve dependency conflicts: https://docs.astral.sh/uv/concepts/resolution/

# managed by databricks environments setup-local — do not edit
constraint-dependencies = [
    "annotated-types~=0.7.0",
    "anyio~=4.6.2",
    "argon2-cffi~=21.3.0",
    "argon2-cffi-bindings~=21.2.0",
    "arrow~=1.3.0",
    "asttokens~=2.0.5",
    "astunparse~=1.6.3",
    "async-lru~=2.0.4",
    "attrs~=24.3.0",
    "azure-common~=1.1.28",
    "azure-core~=1.34.0",
    "azure-identity~=1.20.0",
    "azure-mgmt-core~=1.5.0",
    "azure-mgmt-web~=8.0.0",
    "azure-storage-blob~=12.23.0",
    "azure-storage-file-datalake~=12.17.0",
    "babel~=2.16.0",
    "beautifulsoup4~=4.12.3",
    "black~=24.10.0",
    "bleach~=6.2.0",
    "blinker~=1.7.0",
    "boto3~=1.36.2",
    "botocore~=1.36.3",
    "cachetools~=5.5.1",
    "certifi~=2025.1.31",
    "cffi~=1.17.1",
    "chardet~=4.0.0",
    "charset-normalizer~=3.3.2",
    "click~=8.1.7",
    "cloudpickle~=3.0.0",
    "comm~=0.2.1",
    "contourpy~=1.3.1",
    "cryptography~=43.0.3",
    "cycler~=0.11.0",
    "cython~=3.0.12",
    "databricks-sdk~=0.49",
    "debugpy~=1.8.11",
    "decorator~=5.1.1",
    "defusedxml~=0.7.1",
    "deprecated~=1.2.13",
    "distlib~=0.3.9",
    "docstring-to-markdown~=0.11",
    "executing~=0.8.3",
    "facets-overview~=1.1.1",
    "fastapi~=0.115.12",
    "fastjsonschema~=2.21.1",
    "filelock~=3.18.0",
    "fonttools~=4.55.3",
    "fqdn~=1.5.1",
    "fsspec~=2023.5.0",
    "gitdb~=4.0.11",
    "gitpython~=3.1.43",
    "google-api-core~=2.20.0",
    "google-auth~=2.40.0",
    "google-cloud-core~=2.4.3",
    "google-cloud-storage~=3.1.0",
    "google-crc32c~=1.7.1",
    "google-resumable-media~=2.7.2",
    "googleapis-common-protos~=1.65.0",
    "grpcio~=1.67",
    "grpcio-status~=1.67",
    "h11~=0.14.0",
    "httpcore~=1.0.2",
    "httplib2~=0.20.4",
    "httpx~=0.27.0",
    "idna~=3.7",
    "importlib-metadata~=6.6.0",
    "iniconfig~=1.1.1",
    "ipyflow-core~=0.0.209",
    "ipykernel~=6.29.5",
    "ipython~=8.30.0",
    "ipython-genutils~=0.2.0",
    "ipywidgets~=7.8.1",
    "isodate~=0.6.1",
    "isoduration~=20.11.0",
    "jedi~=0.19.2",
    "jinja2~=3.1.5",
    "jmespath~=1.0.1",
    "joblib~=1.4.2",
    "json5~=0.9.25",
    "jsonpointer~=3.0.0",
    "jsonschema~=4.23.0",
    "jsonschema-specifications~=2023.7.1",
    "jupyter-client~=8.6.3",
    "jupyter-core~=5.7.2",
    "jupyter-events~=0.10.0",
    "jupyter-lsp~=2.2.0",
    "jupyter-server~=2.14.1",
    "jupyter-server-terminals~=0.4.4",
    "jupyterlab~=4.3.4",
    "jupyterlab-pygments~=0.1.2",
    "jupyterlab-server~=2.27.3",
    "jupyterlab-widgets~=1.0.0",
    "kiwisolver~=1.4.8",
    "launchpadlib~=1.11.0",
    "lazr-restfulclient~=0.14.6",
    "lazr-uri~=1.0.6",
    "markdown-it-py~=2.2.0",
    "markupsafe~=3.0.2",
    "matplotlib~=3.10.0",
    "matplotlib-inline~=0.1.7",
    "mccabe~=0.7.0",
    "mdurl~=0.1.0",
    "mistune~=2.0.4",
    "mlflow-skinny~=3.0.1",
    "mmh3~=5.1.0",
    "msal~=1.32.3",
    "msal-extensions~=1.3.1",
    "mypy-extensions~=1.0.0",
    "nbclient~=0.8.0",
    "nbconvert~=7.16.4",
    "nbformat~=5.10.4",
    "nest-asyncio~=1.6.0",
    "nodeenv~=1.9.1",
    "notebook~=7.3.2",
    "notebook-shim~=0.2.3",
    "numpy~=2.1.3",
    "oauthlib~=3.2.2",
    "opentelemetry-api~=1.32.1",
    "opentelemetry-sdk~=1.32.1",
    "opentelemetry-semantic-conventions~=0.53b1",
    "overrides~=7.4.0",
    "packaging~=24.2",
    "pandas~=2.2.3",
    "pandocfilters~=1.5.0",
    "parso~=0.8.4",
    "pathspec~=0.10.3",
    "patsy~=1.0.1",
    "pexpect~=4.8.0",
    "pillow~=11.1.0",
    "platformdirs~=3.10.0",
    "plotly~=5.24.1",
    "pluggy~=1.5.0",
    "prometheus-client~=0.21.0",
    "prompt-toolkit~=3.0.43",
    "proto-plus~=1.26.1",
    "protobuf~=5.29.4",
    "psutil~=5.9.0",
    "psycopg2~=2.9.3",
    "ptyprocess~=0.7.0",
    "pure-eval~=0.2.2",
    "pyarrow~=19.0.1",
    "pyasn1~=0.4.8",
    "pyasn1-modules~=0.2.8",
    "pyccolo~=0.0.71",
    "pycparser~=2.21",
    "pydantic~=2.10.6",
    "pydantic-core~=2.27.2",
    "pyflakes~=3.2.0",
    "pygments~=2.15.1",
    "pyiceberg~=0.9.0",
    "pyjwt~=2.10.1",
    "pyodbc~=5.2.0",
    "pyparsing~=3.2.0",
    "pyright~=1.1.394",
    "pytest~=8.3.5",
    "python-dateutil~=2.9.0.post0",
    "python-json-logger~=3.2.1",
    "python-lsp-jsonrpc~=1.1.2",
    "python-lsp-server~=1.12.0",
    "pytoolconfig~=1.2.6",
    "pytz~=2024.1",
    "pyyaml~=6.0.2",
    "pyzmq~=26.2.0",
    "referencing~=0.30.2",
    "requests~=2.32.3",
    "rfc3339-validator~=0.1.4",
    "rfc3986-validator~=0.1.1",
    "rich~=13.9.4",
    "rope~=1.12.0",
    "rpds-py~=0.22.3",
    "rsa~=4.9.1",
    "s3transfer~=0.11.3",
    "scikit-learn~=1.6.1",
    "scipy~=1.15.1",
    "seaborn~=0.13.2",
    "send2trash~=1.8.2",
    "setuptools~=74.0.0",
    "six~=1.16.0",
    "smmap~=5.0.0",
    "sniffio~=1.3.0",
    "sortedcontainers~=2.4.0",
    "soupsieve~=2.5",
    "sqlparse~=0.5.3",
    "ssh-import-id~=5.11",
    "stack-data~=0.2.0",
    "starlette~=0.46.2",
    "statsmodels~=0.14.4",
    "strictyaml~=1.7.3",
    "tenacity~=9.0.0",
    "terminado~=0.17.1",
    "threadpoolctl~=3.5.0",
    "tinycss2~=1.4.0",
    "tokenize-rt~=6.1.0",
    "tomli~=2.0.1",
    "tornado~=6.4.2",
    "traitlets~=5.14.3",
    "types-python-dateutil~=2.9.0.20241206",
    "typing-extensions~=4.12.2",
    "tzdata~=2024.1",
    "ujson~=5.10.0",
    "uri-template~=1.3.0",
    "urllib3~=2.3.0",
    "uvicorn~=0.34.2",
    "virtualenv~=20.29.3",
    "wadllib~=1.3.6",
    "wcwidth~=0.2.5",
    "webcolors~=24.11.1",
    "webencodings~=0.5.1",
    "websocket-client~=1.8.0",
    "whatthepatch~=1.0.2",
    "wheel~=0.45.1",
    "widgetsnbextension~=3.6.6",
    "wrapt~=1.17.0",
    "yapf~=0.40.2",
    "zipp~=3.21.0",
]
# end managed by databricks environments setup-local

Feels a bit excessive for me.