daml/dev-env/bin/da-virtualenv

13 lines
273 B
Plaintext
Raw Normal View History

2019-04-04 11:33:38 +03:00
#!/usr/bin/env bash
#
# Create a Python virtual environment using either 'conda create' (if
# Anaconda is installed) or with 'python3 -m venv' (otherwise).
set -e
if type conda > /dev/null 2>&1; then
conda create -p "$1" --clone root -y -q
else
python3 -m venv "$1"
fi