From ad5b7ffbf23b87b09d16d0d3548594ff9070c004 Mon Sep 17 00:00:00 2001 From: adator <85586985+adator85@users.noreply.github.com> Date: Fri, 4 Oct 2024 00:08:14 +0200 Subject: [PATCH] Check if virtual env is available --- core/installation.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/installation.py b/core/installation.py index 21ad421..e972253 100644 --- a/core/installation.py +++ b/core/installation.py @@ -1,6 +1,6 @@ import os import json -from sys import exit +from sys import exit, executable, prefix, exec_prefix from dataclasses import dataclass from subprocess import check_call, run, CalledProcessError, PIPE, check_output from platform import python_version, python_version_tuple @@ -161,6 +161,11 @@ class Install: try: newVersion = False self.get_packages_version_from_json() + + if not self.config.venv_folder in prefix: + print(f"You are probably running a new installation or you are not using your virtual env {self.config.venv_folder}") + return newVersion + print(f"> Checking for dependencies versions ==> WAIT") for package in self.DB_PACKAGES: newVersion = False