[BUG] Extension fails checking env dependencies when using `uv` as package/project management tool rather than pip
Describe the bug When a virtual environment is initialized using uv, pip will not be added to the venv since it is not needed for package management when I already have uv. However, the Databricks extension assumes pip is available and thus fails when checking dependencies. The precise error message is as follows:
Failed to check python environment dependencies:
"Command failed:
cmd.exe /d /c ""c:\[path\to\my-project]\.venv\Scripts\python.exe" "-m" "pip" "list"
"--format" "json" "--disable-pip-version-check"
"--no-python-version-warning""
c:\[path\to\my-project]\.venv\Scripts\python.exe: No module named pip ".
To Reproduce Steps to reproduce the behavior:
- Install uv
- In a databricks project directory, run
uv venv - Open Vscode
- See error
System information:
Version: 1.99.0 (user setup) Commit: 4437686ffebaf200fa4a6e6e67f735f3edf24ada Date: 2025-04-02T21:35:19.530Z Electron: 34.3.2 ElectronBuildId: 11161073 Chromium: 132.0.6834.210 Node.js: 20.18.3 V8: 13.2.152.41-electron.0 OS: Windows_NT x64 10.0.22631
Databricks Version: 2.9.2
Databricks Extension Logs Databricks Logs.log
is there a workaround to still use uv and databricks connect as we wait for the PR?
One workaround is to call uv venv --seed in your already existing venv (docs). It will install pip into the venv, which will make our internal calls to pip work.
thanks! much appreciated 👍🏻
Released 2.10.1 with the uv support. We only use uv if the command is accessible from the vscode (so, on the PATH), and if the project has the uv.lock in the root