Skip to content
This repository has been archived by the owner. It is now read-only.
/ venv-switcher Public archive

A minimal script to auto switch between Python virtual environments

Notifications You must be signed in to change notification settings

not-poma/venv-switcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

A Python venv switcher for zsh

This is a minimal script that helps you switch between Python virtual environments. It recursively searches for a venv or .venv directory in the current directory and all its parents. If it finds one, it activates it. If it doesn't find one, it deactivates the current virtual environment.

It also contains mkvenv command that creates a new virtual environment in the current directory, activates it, and installs dependencies form requirements.txt if it exists.

The script contains minimal functionality on purpose to keep it simple and easy to understand. If you want more features, you can use zsh-autoswitch-virtualenv.

Installation

curl -o ~/.venv.zsh https://raw.githubusercontent.com/not-poma/venv-switcher/master/venv.zsh
echo "[[ -f ~/.venv.zsh ]] && source ~/.venv.zsh" >> ~/.zshrc

Restart your shell or run source ~/.venv.zsh to apply the changes

About

A minimal script to auto switch between Python virtual environments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages