From fe22e86ce7c451c3ae7e0e453407f37084299832 Mon Sep 17 00:00:00 2001 From: Hristo Jelev Date: Tue, 19 Dec 2023 19:03:17 +0200 Subject: [PATCH] fix installation --- install.sh | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/install.sh b/install.sh index 5dde2ae..35a5a63 100755 --- a/install.sh +++ b/install.sh @@ -29,20 +29,6 @@ find_python(){ fi } -create_venv(){ - # Check if python3-venv is installed - if ! dpkg -l | grep -q python3-venv; then - echo "python3-venv is not installed. Installing..." - sudo apt-get install -y python3-venv - fi - - # Create a virtual environment - ${python} -m venv env - - # Activate the virtual environment - source env/bin/activate -} - printm(){ length=$(expr length "$1") length=$(($length + 4)) @@ -73,9 +59,24 @@ check_and_install_pip(){ fi } +create_venv(){ + printm "Creating virtual environment" + # Check if python3-venv is installed + if ! dpkg -l | grep -q python3-venv; then + echo "python3-venv is not installed. Installing..." + sudo apt-get install -y python3-venv + fi + + # Create a virtual environment + ${python} -m venv env + + # Activate the virtual environment + source env/bin/activate +} + install_requirements(){ printm "Installing requirements" - sudo $pip_run install -r requirements.txt + $pip_run install -r requirements.txt } update_config(){