Skip to content

Instantly share code, notes, and snippets.

@sebastian-berlin-wmse
sebastian-berlin-wmse / venv
Created April 10, 2024 08:56
Setup and run venv
#! /usr/bin/env bash
source .venv/bin/activate && return 0
read -p "Create venv in .venv/? [y/N] " -r
if [[ $REPLY =~ ^[Yy]$ ]]
then
pythonVersions=$(
ls ${PATH//:/ } |
grep -E "^python[0-9]+\.[0-9]+$" |