Skip to content
Closed
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
8 changes: 7 additions & 1 deletion examples/install_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@ def hasWhitespace(string):
ARTIFACTORY_URL = 'https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local'

# Check if in virtual environment
in_venv = getattr(sys, "real_prefix", getattr(sys, "base_prefix", sys.prefix)) != sys.prefix
in_venv = any([
"VIRTUAL_ENV" in os.environ, # Virtualenv
"PIPENV_ACTIVE" in os.environ, # Pipenv
"CONDA_PREFIX" in os.environ, # Conda/Mamba
getattr(sys, "real_prefix", getattr(sys, "base_prefix", sys.prefix)) != sys.prefix # Standard venv detection
])

pip_call = [sys.executable, "-m", "pip"]
pip_installed = True
pip_install = pip_call + ["install", "-U"]
Expand Down
Loading