Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension for VSCode environment manager extension #11314

Open
jzazo opened this issue Feb 7, 2025 · 5 comments
Open

Extension for VSCode environment manager extension #11314

jzazo opened this issue Feb 7, 2025 · 5 comments
Labels
enhancement New feature or improvement to existing functionality

Comments

@jzazo
Copy link

jzazo commented Feb 7, 2025

Summary

There is feature request in vscode-python-environments to integrate various environment managers into VSCode. UV among the community extension asking for help. Created this issue to ask integration into VSCode. Thank you.

Example

No response

@jzazo jzazo added the enhancement New feature or improvement to existing functionality label Feb 7, 2025
@elasticdotventures
Copy link

elasticdotventures commented Feb 12, 2025

😂 I came here to look for / write this after wondering why this didn't already exist with the intention to start the topic if it didn't!

Ctrl+Shift+P => Python: Select Interpreter

  • Create Virtual Environment
  • Select an Environment
    currently has:
    Venv: Creates a .venv virtual environment in the current workspace
    Conda: Creates a .conda Conda environment in the current workspace

🤔 In a moment of retrospection - I'm wondering if the UV vscode plugin should even exist.
would it not be better to approach this as PR requests for vscode-python .. surely uv has achieved enough popularity to warrant/enjoy some level of functionality with vscode-python itself.

https://github.com/microsoft/vscode-python/blob/main/src/client/common/utils/localize.ts

I'm a novice to uv but curious what other features/behaviors others might find desirable?

@elasticdotventures
Copy link

elasticdotventures commented Feb 12, 2025

👋🏻 @cwebster-99 do you have any thoughts on this topic?

microsoft/vscode-python#20649 (comment)

it appears uv is already on the radar of python-vscode

@elasticdotventures
Copy link

in terms of desirable features within astral uv

  • recommended list of plugins maintained by uv for vscode
  • a devcontainer example that installs a uv environment

@cwebster-99
Copy link

Hey folks 👋 thanks for the ping on this thread!

Regarding uv support, we encourage community contributions to develop an extension that integrates with our Python Environments extension, providing a custom end-to-end experience. Currently, Python Environments is experimental/in-preview, but we hope it will stabilize and become the default alongside the vscode-python extension in the coming months. A custom uv extension would give full control to uv when selected as the preferred manager. At present, if uv is detected, we leverage it to support venv in environment creation and package installation. However, we do not plan to incorporate additional uv features ourselves. This is not exclusive to uv, but applied for all environment and package managers in the ecosystem simply for maintenance reasons.

Some unique features we recognize a uv extension may provide:

  • Pull in Python installs if unavailable on the user's machine.
  • Manage uv environments created and stored in different locations.
  • Enhance project creation, which we have added as an experimental feature, but can be greatly improved.
  • Provide a mechanism to acquire uv, which the vscode-python extension does not support and we do not plan to add.
  • Pep723 handling could provide a really smooth experience if built into a uv extension.

Additionally, the Python extension could recommend a uv extension if we detect it in the users environment.

We hope our APIs can help provide tailored support, but we welcome feedback on how they can be improved. We recognize uv is growing rapidly in the Python community, and we would love to see this supported in VS Code through a community built extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement to existing functionality
Projects
None yet
Development

No branches or pull requests

4 participants