Enforcing copilot to use uv or activate the corresponding virtualenv?
#161943
-
Select Topic AreaProduct Feedback Copilot Feature AreaCopilot Agent Mode BodyCan we enforce GitHub Copilot in See also: microsoft/vscode#237338 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
PLEASE NOTE: As of now, Copilot Agent Mode does not allow setting a preferred interpreter or runtime (e.g., uv, poetry, etc.). Good solutions:1. Alias
|
Beta Was this translation helpful? Give feedback.
PLEASE NOTE: As of now, Copilot Agent Mode does not allow setting a preferred interpreter or runtime (e.g., uv, poetry, etc.).
Good solutions:
1. Alias
pythonGlobally (Quick and Dirty)Edit your shell configuration (
~/.bashrc,~/.zshrc, or~/.profile) and add:alias python='uv run python'Then reload your shell:
source ~/.bashrc # or the appropriate config file2. Use .envrc with direnv (Recommended Per-Project)
Install direnv if you haven’t already.
➤ Step 1: Enable direnv in your shell
echo 'eval "$(direnv hook bash)"' >> ~/.bashrc # or use zsh/fishsource ~/.bashrc…