You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/usr/bin/python3 -c "import sys; from packaging.specifiers import SpecifierSet; from packaging.version import Version; sys.exit(Version('${installed_version}') not in SpecifierSet('${version_requirement}'))"2> /dev/null &&echo"${package}${version_requirement}: ${installed_version}"&&return 0
52
+
/usr/bin/python3 -m pip install "${package}${version_requirement}"|| { echo"[tue-env](bootstrap) Error! Could not install '${package}${version_requirement}.";return 1; }
Copy file name to clipboardExpand all lines: setup.bash
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -81,8 +81,13 @@ function _tue-env-main
81
81
82
82
# -----------------------------------------
83
83
# Load the python virtual environment if it exists
84
-
if [[ -d"${TUE_ENV_DIR}"/.venv/"${TUE_ENV}" ]]
84
+
if [[ -d"${TUE_ENV_DIR}"/.env/venv/ ]]
85
85
then
86
+
# shellcheck disable=SC1091
87
+
source"${TUE_ENV_DIR}"/.env/venv/bin/activate
88
+
elif [[ -d"${TUE_ENV_DIR}"/.venv/"${TUE_ENV}" ]]
89
+
then
90
+
echo -e "\e[33;1m[tue] virtual environment location '${TUE_ENV_DIR}/.venv/${TUE_ENV}' is deprecated. Please create a new environment using 'tue-env init-venv ${TUE_ENV}'.\e[0m"
{ echo -e "[tue-env](init-venv) 'virtualenv' module is not found. Make sure you install it 'sudo apt-get install python3-virtualenv'";return 1; }
589
+
{ echo -e "[tue-env](init-venv) 'virtualenv' module is not found. Make sure you install it \"/usr/bin/python3 -m pip install --user 'virtualenv>=20.24.0'\"";return 1; }
590
590
591
591
[[ -f"${TUE_DIR}"/user/envs/"${tue_env}" ]] || { echo"[tue-env](init-venv) No such environment: '${tue_env}'";return 1; }
0 commit comments