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