Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

VS Code extension for Python environment and package management

License

NotificationsYou must be signed in to change notification settings

robwoods-cam/vscode-python-environments

 
 

Repository files navigation

Overview

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).

Features

Environment Management

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:

IdnameDescription
ms-python.python:venvvenvThe default environment manager. It is a built-in environment manager provided by the Python standard library.
ms-python.python:systemSystem Installed PythonThese 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:condacondaTheconda 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.

Package Management

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:

IdnameDescription
ms-python.python:pippipPip acts as the default package manager and it's typically built-in to Python.
ms-python.python:condacondaTheconda package manager, as provided by conda distributions likeAnaconda Distribution orconda-forge.

Settings Reference

Setting (python-envs.)DefaultDescription
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.showActivateButtonfalse[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.

API Reference (proposed)

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

Contributing

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.

Questions, issues, feature requests, and contributions

  • 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.

Data and telemetry

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.

Trademarks

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript98.2%
  • Python1.3%
  • JavaScript0.5%

[8]ページ先頭

©2009-2025 Movatter.jp