forked from NillionNetwork/nillion-python-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_venv.sh
More file actions
executable file
·24 lines (19 loc) · 765 Bytes
/
Copy pathcreate_venv.sh
File metadata and controls
executable file
·24 lines (19 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash
function create_venv () {
if [[ ! -z "${VIRTUAL_ENV:-}" ]]; then
echo "Virtualenv is already active! Run 'deactivate' to deactivate the virtualenv."
return 0
fi
echo "Creating virtualenv"
python3 -m pip install --user virtualenv==20.24.6
NILLION_VENV=".venv"
mkdir -p "$NILLION_VENV"
python3 -m virtualenv -p python3 "$NILLION_VENV"
source "$NILLION_VENV/bin/activate"
python3 -m pip install -r requirements.txt
echo "Virtualenv: $NILLION_VENV"
echo "Check the $NILLION_VENV/lib/python3.1X/site-packages folder to make sure you have py_nillion_client and nada_dsl packages"
echo "📋 Copy and run the following command to activate your environment:"
echo "source $NILLION_VENV/bin/activate"
}
create_venv