-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcondarc.example
More file actions
105 lines (93 loc) · 5.22 KB
/
Copy pathcondarc.example
File metadata and controls
105 lines (93 loc) · 5.22 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# ============================================================================
# ~/.condarc — Conda configuration
# ============================================================================
#
# Conda's behavior is shaped almost entirely by ~/.condarc. The defaults
# are conservative (slow solver, narrow channel, no startup discipline),
# which causes the "conda is slow / breaks my env" complaints you'll see
# online. The settings below fix the three biggest pain points:
#
# 1. Slow dependency resolution → libmamba solver
# 2. Narrow package coverage → conda-forge channel
# 3. Auto-activated base on every shell startup → disabled
#
# Apply by copying this file to ~/.condarc, then running:
# conda config --show # verify it was picked up
#
# ============================================================================
# ----------------------------------------------------------------------------
# Channels — where conda looks for packages, in priority order
# ----------------------------------------------------------------------------
# conda-forge is the community-maintained channel with the broadest package
# coverage and the fastest updates. defaults is Anaconda's official channel
# — narrower, slower-moving, but bundled with Miniconda installs.
#
# Listing conda-forge FIRST means it wins on package source when both
# channels have the same package. defaults is kept as a fallback for
# packages that exist only there.
# ----------------------------------------------------------------------------
channels:
- conda-forge
- defaults
# ----------------------------------------------------------------------------
# Strict channel priority — prevents "mixed-channel dependency hell"
# ----------------------------------------------------------------------------
# Without strict priority, conda can pull dependencies from any channel
# regardless of order. Result: an env where numpy comes from conda-forge,
# scipy comes from defaults, and the two were built against incompatible
# BLAS libraries. Subtle breakage, hard to debug.
#
# Strict priority forces conda to satisfy ALL deps from the highest-priority
# channel that has them, only falling back to lower-priority channels when
# necessary. Slightly stricter solves, dramatically fewer "why is this
# import segfaulting" mysteries.
# ----------------------------------------------------------------------------
channel_priority: strict
# ----------------------------------------------------------------------------
# Solver — use libmamba (5–10x faster than the classic solver)
# ----------------------------------------------------------------------------
# libmamba is now the default in newer conda versions, but older installs
# still use the classic solver. Setting this explicitly future-proofs the
# config and makes the choice visible.
#
# If conda errors with "no module named libmambapy" when this is set,
# install it once: `conda install -n base conda-libmamba-solver`
# ----------------------------------------------------------------------------
solver: libmamba
# ----------------------------------------------------------------------------
# Don't auto-activate the base env on shell startup
# ----------------------------------------------------------------------------
# Default conda behavior is to activate the `base` env every time you open
# a new shell. This pollutes your PATH, slows shell startup, and means
# every `python` call you make resolves to base's Python instead of the
# system Python. Setting this to false means `conda activate <env>` is an
# explicit, intentional action — not a side effect of opening a terminal.
#
# Tradeoff: you have to `conda activate <env>` every time you want conda's
# tools. The discipline is worth it.
# ----------------------------------------------------------------------------
auto_activate_base: false
# ----------------------------------------------------------------------------
# Don't show channel URLs in the conda list output
# ----------------------------------------------------------------------------
# Cosmetic — keeps `conda list` output clean and readable. Set to true if
# you want to see exactly which channel each package came from (useful
# when debugging cross-channel issues).
# ----------------------------------------------------------------------------
show_channel_urls: false
# ----------------------------------------------------------------------------
# pip + conda interop — keep them separate, on purpose
# ----------------------------------------------------------------------------
# When pip_interop_enabled is true, conda tries to manage pip-installed
# packages as if they were conda packages. This sounds helpful and usually
# causes more problems than it solves — conda's solver can decide a
# pip-installed package is "incompatible" and try to replace it, breaking
# the env.
#
# Better discipline: use conda for the Python version and any C-extension-
# heavy packages (numpy, scipy, pytorch); use pip for everything else
# (most pure-Python libs); accept that conda doesn't track pip's state.
# When in doubt, install via conda first; fall back to pip only if the
# package isn't in conda-forge.
# ----------------------------------------------------------------------------
pip_interop_enabled: false