- Notifications
You must be signed in to change notification settings - Fork0
VS Code extension for Python environment and package management
License
robwoods-cam/vscode-python-environments
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
The Python Environments and Package Manager extension for VS Code helps you manage Python environments and packages using your preferred environment manager backed by its extensible APIs. This extension provides unique support to specify environments for specific files or whole Python folders or projects, including multi-root & mono-repos scenarios.
Note: This extension is in preview and its APIs and features are subject to change as the project continues to evolve.
Important: This extension currently requires the pre-release version of the Python extension (ms-python.python) to operate (version 2024.23.2025010901 or later).
This extension provides an Environments view, which can be accessed via the VS Code Activity Bar, where you can manage your Python environments. Here, you can create, delete, and switch between environments, as well as install and uninstall packages within the selected environment. It also provides APIs for extension developers to contribute their own environment managers.
By default, the extension uses thevenv
environment manager. This default manager determines how environments are created, managed, and where packages are installed. However, users can change the default by setting thepython-envs.defaultEnvManager
to a different environment manager. The following environment managers are supported out of the box:
Id | name | Description |
---|---|---|
ms-python.python:venv | venv | The default environment manager. It is a built-in environment manager provided by the Python standard library. |
ms-python.python:system | System Installed Python | These are global Python installs on your system. These are typically installed with your OS, frompython.org, or any other OS package manager. |
ms-python.python:conda | conda | Theconda environment manager, as provided by conda distributions likeAnaconda Distribution orconda-forge. |
The environment manager is responsible for specifying which package manager will be used by default to install and manage Python packages within the environment. This ensures that packages are managed consistently according to the preferred tools and settings of the chosen environment manager.
This extension provides a package view for you to manage, install and uninstall you Python packages in any particular environment. This extension provides APIs for extension developers to contribute package managers.
The extension usespip
as the default package manager. You can change this by setting thepython-envs.defaultPackageManager
setting to a different package manager. The following are package managers supported out of the box:
Id | name | Description |
---|---|---|
ms-python.python:pip | pip | Pip acts as the default package manager and it's typically built-in to Python. |
ms-python.python:conda | conda | Theconda package manager, as provided by conda distributions likeAnaconda Distribution orconda-forge. |
Setting (python-envs.) | Default | Description |
---|---|---|
defaultEnvManager | "ms-python.python:venv" | The default environment manager used for creating and managing environments. |
defaultPackageManager | "ms-python.python:pip" | The default package manager to use for installing and managing packages. This is often dictated by the default environment manager but can be customized. |
pythonProjects | [] | A list of Python workspaces, specified by the path, in which you can set particular environment and package managers. You can set information for a workspace as[{"path": "/path/to/workspace", "envManager": "ms-python.python:venv", "packageManager": "ms-python.python:pip"]} . |
terminal.showActivateButton | false | [experimental] Show a button in the terminal to activate/deactivate the current environment for the terminal. This button is only shown if the active terminal is associated with a project that has an activatable environment. |
Seeapi.ts for the full list of Extension APIs.
To consume these APIs you can look at the example here:https://github.com/microsoft/vscode-python-environments/blob/main/src/examples/README.md
This project welcomes contributions and suggestions. Most contributions require you to agree to aContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant usthe rights to use your contribution. For details, visithttps://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to providea CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructionsprovided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted theMicrosoft Open Source Code of Conduct.For more information see theCode of Conduct FAQ orcontactopencode@microsoft.com with any additional questions or comments.
- If you have a question about how to accomplish something with the extension, pleaseask on our Discussions page.
- If you come across a problem with the extension, pleasefile an issue.
- Contributions are always welcome! Please see ourcontributing guide for more details.
- Any and all feedback is appreciated and welcome!
- If someone has alreadyfiled an issue that encompasses your feedback, please leave a 👍/👎 reaction on the issue.
- Otherwise please start anew discussion.
- If you're interested in the development of the extension, you can read about ourdevelopment process.
The Microsoft Python Extension for Visual Studio Code collects usage data and sends it to Microsoft to help improve our products and services. Read ourprivacy statement to learn more. This extension respects thetelemetry.enableTelemetry
setting which you can learn more about athttps://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must followMicrosoft's Trademark & Brand Guidelines.Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.Any use of third-party trademarks or logos are subject to those third-party's policies.
About
VS Code extension for Python environment and package management
Resources
License
Code of conduct
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Languages
- TypeScript98.2%
- Python1.3%
- JavaScript0.5%