astral-sh/uv · error · anyhow::Error
pip-compile's `--config` is unsupported (uv does not use a c
Error message
pip-compile's `--config` is unsupported (uv does not use a configuration file)
What it means
pip-compile's `--config PATH` points at a pip.conf-style configuration file. uv's pip interface does not read pip configuration files at all — its settings come from CLI flags, environment variables, and `uv.toml`/`pyproject.toml` — so `PipCompileCompatArgs::validate()` rejects the flag rather than ignoring a file you expect to be honored. The pip-sync variant fails the same way (compat.rs:237).
Source
Thrown at crates/uv-cli/src/compat.rs:129
return Err(anyhow!(
"pip-compile's `--client-cert` is unsupported (uv doesn't support dedicated client certificates)"
));
}
if self.emit_trusted_host {
return Err(anyhow!(
"pip-compile's `--emit-trusted-host` is unsupported"
));
}
if self.no_emit_trusted_host {
warn_user!(
"pip-compile's `--no-emit-trusted-host` has no effect (uv never emits trusted hosts)"
);
}
if self.config.is_some() {
return Err(anyhow!(
"pip-compile's `--config` is unsupported (uv does not use a configuration file)"
));
}
if self.emit_options {
return Err(anyhow!(
"pip-compile's `--emit-options` is unsupported (try `--emit-build-options` instead)"
));
}
if self.no_emit_options {
warn_user!("pip-compile's `--no-emit-options` has no effect (uv never emits options)");
}
if self.pip_args.is_some() {
return Err(anyhow!(
"pip-compile's `--pip-args` is unsupported (try passing arguments to uv directly)"
));View on GitHub (pinned to f1a42680ff)
Solutions
- Remove `--config` and move the settings into `uv.toml` (or `[tool.uv]`/`[tool.uv.pip]` in pyproject.toml) next to the requirements file.
- Translate remaining options to CLI flags or `UV_*` environment variables in the script.
- Use `--isolated`-style explicitness: keep all uv pip settings in version control so no ambient config is needed.
Example fix
# before uv pip compile --config pip-tools.conf requirements.in # after (uv.toml) # [[pip.index]] # url = "https://pypi.internal/simple" uv pip compile requirements.in
Defensive patterns
Strategy: validation
Validate before calling
def assert_no_pip_config(argv: list[str]) -> None:
if any(a == "--config" or a.startswith("--config=") for a in argv):
raise ValueError("uv does not read pip config files; move settings to uv.toml or flags") Prevention
- Translate pip.conf/pip-tools.conf entries into uv.toml once, in the same change that migrates the command.
- Store per-project uv settings in version control next to requirements files.
- Document which env vars (UV_*) replace each old pip.conf entry.
When it happens
Trigger: `uv pip compile --config pip.conf requirements.in` or `uv pip sync --config pip.conf requirements.txt` after migrating a pipeline that kept per-project pip configuration in a file.
Common situations: Monorepos with per-directory pip.conf; CI that parameterized pip-compile with a generated config file; teams assuming uv reads pip.conf because the subcommands are pip-compatible.
Related errors
- pip-compile's `--reuse-hashes` is unsupported (uv doesn't re
- pip-compile's `--resolver=legacy` is unsupported (uv always
- pip-compile's `--max-rounds` is unsupported (uv always resol
- pip-compile's `--client-cert` is unsupported (uv doesn't sup
- pip-compile's `--emit-trusted-host` is unsupported
AI-assisted analysis of astral-sh/uv@f1a42680ff (2026-08-16).
Data as JSON: /api/errors/fc43690215ff5e72.
Report an issue: GitHub.