aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/portage/__init__.py')
-rw-r--r--lib/portage/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/portage/__init__.py b/lib/portage/__init__.py
index 621b1d99f..178d724db 100644
--- a/lib/portage/__init__.py
+++ b/lib/portage/__init__.py
@@ -360,7 +360,8 @@ except (ImportError, OSError) as e:
# END OF IMPORTS -- END OF IMPORTS -- END OF IMPORTS -- END OF IMPORTS -- END
# ===========================================================================
-_python_interpreter = os.path.realpath(sys.executable)
+_python_interpreter = (sys.executable if os.environ.get("VIRTUAL_ENV")
+ else os.path.realpath(sys.executable))
_bin_path = PORTAGE_BIN_PATH
_pym_path = PORTAGE_PYM_PATH
_not_installed = os.path.isfile(os.path.join(PORTAGE_BASE_PATH, ".portage_not_installed"))