Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Update Install.sh to detect and handle Conda env #122

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions Install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# BSD 2-Clause License
#
# Copyright (c) 2019, Allied Vision Technologies GmbH
# Copyright (c) 2019-2022, Allied Vision Technologies GmbH
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -69,7 +69,14 @@ function get_bool_input()
function inside_virtual_env
{
if [ -z "$VIRTUAL_ENV" ]; then
echo "false"
# No virtualenv or venv. Detect a conda env
if [ -z "$CONDA_PREFIX" ]; then
echo "false"
else
# Treat conda env the same as a virtualenv or venv
VIRTUAL_ENV=$CONDA_PREFIX
echo "true"
fi
else
echo "true"
fi
Expand Down