echo "Setting up venv" python3 -m venv venv # 1>/dev/null 2>/dev/null res_code=$? if [ $res_code -ne 0 ]; then echo "Please make sure python3 is installed on your machine and that you have the right to create a venv here" return; fi echo "activating the venv" . venv/bin/activate # 1>/dev/null 2>/dev/null res_code=$? if [ $res_code -ne 0 ]; then echo "could not activate the venv, please check that $PWD/venv/bin/activate exists and that you have the right to source it" return; fi echo "adding the necessary packages to the venv" pip install -r requirements.txt if [ $res_code -ne 0 ]; then echo "could not download all requirements in the file $PWD/requirements.txt" return; fi echo "venv correctly setup at $PWD"