An open API service indexing awesome lists of open source software.

https://github.com/tox-dev/pyvenvmanage


https://github.com/tox-dev/pyvenvmanage

Last synced: 24 days ago
JSON representation

Awesome Lists containing this project

README

          

# PyVenvManage

[![Build](https://github.com/tox-dev/PyVenvManage/actions/workflows/check.yaml/badge.svg)](https://github.com/tox-dev/PyVenvManage/actions/workflows/check.yaml)
[![Version](https://img.shields.io/jetbrains/plugin/v/20536)](https://plugins.jetbrains.com/plugin/20536/versions)
[![Rating](https://img.shields.io/jetbrains/plugin/r/rating/20536)](https://plugins.jetbrains.com/plugin/20536)
[![Downloads](https://img.shields.io/jetbrains/plugin/d/20536)](https://plugins.jetbrains.com/plugin/20536)

## Introduction

**PyVenvManage** simplifies Python virtual environment management in JetBrains IDEs.

Managing multiple Python interpreters across different virtual environments (for testing against various Python versions
with tools like `tox` or `nox`) traditionally requires navigating through multiple dialogs in PyCharm or other JetBrains
IDEs. PyVenvManage streamlines this by enabling quick interpreter selection directly from the project view with just a
right-click.

## Features

- **Quick interpreter switching**: Right-click any virtual environment folder to set it as your project or module
interpreter instantly
- **Smart environment detection**: Automatically detects environment types (UV, Conda, Poetry, Hatch, Pipenv,
virtualenv) and sets appropriate metadata and icons
- **Dynamic icons**: Tree view and context menus display environment-specific icons (UV, Conda, Poetry, Hatch, Pipenv)
based on detection
- **Visual identification**: Virtual environment folders display with customizable decoration (e.g.,
`.venv [3.11.5 - CPython]`) in the project view
- **Customizable decorations**: Configure which fields to show (Python version, implementation, system site-packages,
creator tool), their order, and the format via Settings
- **Multi-IDE support**: Works with PyCharm (Community and Professional), IntelliJ IDEA, GoLand, CLion, and RustRover
- **Smart association**: In-project virtual environments are associated with the current project; external environments
(Poetry cache, Hatch cache, Pipenv virtualenvs) remain global
- **Cached version display**: Python version information is cached for performance and automatically refreshed when
`pyvenv.cfg` files change

## Supported IDEs

Version 2026.1 or later of:

- PyCharm (Community and Professional)
- IntelliJ IDEA (Community and Ultimate)
- GoLand
- CLion
- RustRover

**Note**: Version 2.2.x supports PyCharm 2025.1 and earlier.

## Install

In your JetBrains IDE, open **Settings** -> **Plugins**, search for "PyVenv Manage", and click **Install**.

The official plugin page is at https://plugins.jetbrains.com/plugin/20536-pyvenv-manage-2

## Usage

![usage video](anim.gif?raw=true)

1. Create or navigate to a Python virtual environment folder in your project
1. Right-click the virtual environment folder (e.g., `venv`, `.venv`, or any folder with a `pyvenv.cfg`)
1. Select **Set as Project Interpreter** or **Set as Module Interpreter**
1. The interpreter is configured instantly with a confirmation notification

## Settings

Open **Settings** -> **PyVenv Manage** to customize the virtual environment decoration display:

- **Prefix/Suffix**: Characters surrounding the decoration (default: ` [` and `]`)
- **Separator**: Text between fields (default: `-`)
- **Fields**: Enable, disable, and reorder which information to display:
- Python version (e.g., `3.14.2`)
- Python implementation (e.g., `CPython`)
- System site-packages indicator (`SYSTEM`)
- Virtual environment creator (e.g., `uv@0.9.21`)

A live preview updates as you modify settings.

## License

This project is licensed under the BSD-3-Clause license - see the
[LICENSE](https://github.com/pyvenvmanage/PyVenvManage/blob/main/LICENSE).