Skip to content

Commit

Permalink
Merge pull request #31 from ma-sadeghi/bug/fix-venv
Browse files Browse the repository at this point in the history
Use sys.prefix to determine if inside a virtualenv
  • Loading branch information
cjdoris authored May 6, 2024
2 parents 311d106 + 7163093 commit 9be25fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/juliapkg/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def reset_state():
raise Exception(f'{project_key} must be an absolute path')
STATE['project'] = project
else:
vprefix = os.getenv('VIRTUAL_ENV')
vprefix = sys.prefix if sys.prefix != sys.base_prefix else None
cprefix = os.getenv('CONDA_PREFIX')
if cprefix and vprefix:
raise Exception('You are using both a virtual and conda environment, cannot figure out which to use!')
Expand Down

0 comments on commit 9be25fb

Please sign in to comment.