diff --git a/nodeenv.py b/nodeenv.py index 8687c1a..d288d51 100644 --- a/nodeenv.py +++ b/nodeenv.py @@ -1010,7 +1010,9 @@ def get_env_dir(opt, args): if opt.python_virtualenv: if hasattr(sys, 'real_prefix'): res = sys.prefix - elif hasattr(sys, 'base_prefix') and (sys.base_prefix != sys.prefix or 'CONDA_PREFIX' in os.environ): + elif hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix: + res = sys.prefix + elif 'CONDA_PREFIX' in os.environ: res = sys.prefix else: logger.error('No python virtualenv is available')