at master 2.3 kB view raw
1diff --git i/conda/base/context.py w/conda/base/context.py 2index adf6d6e89..82f2c77f9 100644 3--- i/conda/base/context.py 4+++ w/conda/base/context.py 5@@ -832,7 +832,7 @@ class Context(Configuration): 6 7 @property 8 def conda_prefix(self) -> PathType: 9- return abspath(sys.prefix) 10+ return expand("~/.conda") 11 12 @property 13 @deprecated( 14@@ -864,35 +864,20 @@ class Context(Configuration): 15 The vars can refer to each other if necessary since the dict is ordered. 16 None means unset it. 17 """ 18- if context.dev: 19- if pythonpath := os.environ.get("PYTHONPATH", ""): 20- pythonpath = os.pathsep.join((CONDA_SOURCE_ROOT, pythonpath)) 21- else: 22- pythonpath = CONDA_SOURCE_ROOT 23- return { 24- "CONDA_EXE": sys.executable, 25- "_CONDA_EXE": sys.executable, 26- # do not confuse with os.path.join, we are joining paths with ; or : delimiters 27- "PYTHONPATH": pythonpath, 28- "_CE_M": "-m", 29- "_CE_CONDA": "conda", 30- "CONDA_PYTHON_EXE": sys.executable, 31- "_CONDA_ROOT": self.conda_prefix, 32- } 33- else: 34- exe = os.path.join( 35- self.conda_prefix, 36- BIN_DIRECTORY, 37- "conda.exe" if on_win else "conda", 38- ) 39- return { 40- "CONDA_EXE": exe, 41- "_CONDA_EXE": exe, 42- "_CE_M": None, 43- "_CE_CONDA": None, 44- "CONDA_PYTHON_EXE": sys.executable, 45- "_CONDA_ROOT": self.conda_prefix, 46- } 47+ import sys 48+ return { 49+ "CONDA_EXE": sys.executable, 50+ "_CONDA_EXE": sys.executable, 51+ # do not confuse with os.path.join, we are joining paths with ; or : delimiters 52+ "PYTHONPATH": os.pathsep.join( 53+ [CONDA_SOURCE_ROOT, os.environ.get("PYTHONPATH", "")] + [path for path in sys.path if "site-packages" in path] 54+ ), 55+ 56+ "_CE_M": "-m", 57+ "_CE_CONDA": "conda", 58+ "CONDA_PYTHON_EXE": sys.executable, 59+ "_CONDA_ROOT": self.conda_prefix, 60+ } 61 62 @memoizedproperty 63 def channel_alias(self) -> Channel: