LykosAI/StabilityMatrix · error · ProcessException
pip show returned no output for package
Error message
pip show returned no output for package '{packageName}': {result.StandardError} What it means
UvVenvRunner.PipShow throws this ProcessException when `uv pip show` exits successfully (code 0) but StandardOutput is empty or whitespace, so PipShowResult.Parse would have nothing to parse. The package-not-found case is handled separately (returns null), so an empty-but-successful result means pip gave an inconsistent/blank response — usually stderr (included in the message) explains why.
Solutions
- Check the StandardError text in the exception message for pip's explanation.
- Run the same `uv pip show <pkg> --python <venvPython>` command manually to reproduce and inspect raw output.
- Update uv to a current version so `pip show` emits standard output.
- If the environment is suspect, recreate the venv and retry the query.
Example fix
// before: assuming a null return covers all negative outcomes
var info = await runner.PipShow(pkg);
// after: also handle the empty-output exception
PipShowResult? info;
try { info = await runner.PipShow(pkg); }
catch (ProcessException ex) when (ex.Message.Contains("returned no output")) {
info = null; // treat as unknown/uninstalled after logging ex.Message
} Defensive patterns
Strategy: try-catch
Validate before calling
var probe = await ProcessRunner.GetProcessResultAsync(runner.UvExecutablePath, new[] { "--version" }, null, null);
if (probe.ExitCode != 0) throw new InvalidOperationException("uv broken"); Type guard
static bool UvWorks(UvVenvRunner r) => File.Exists(r.UvExecutablePath);
Try / catch
try { info = await runner.PipShow(pkg); }
catch (ProcessException ex) when (ex.Message.Contains("returned no output")) { info = null; } Prevention
- Treat empty stdout with exit 0 as an anomaly; log stderr from the message.
- Pin a known-good uv version for reproducible pip output.
- Check environment variables passed to the runner don't redirect/suppress output.
When it happens
Trigger: Calling PipShow(packageName) where the subprocess returns exit code 0 but no stdout: pip emitting only errors to stderr while still exiting 0, an unusual uv version suppressing show output, or output redirection/capture producing nothing.
Common situations: Odd uv/pip builds with nonstandard show output; environment (env vars, locale) altering pip behavior; stdout swallowed by a misconfigured ProcessRunner capture; exotic package metadata that makes pip print nothing.
Related errors
- pip install failed with code
- pip list failed with code
- pip show returned no output for package
- pip install failed with code
- pip show failed with code
AI-assisted analysis of LykosAI/StabilityMatrix@af93d6ef57 (2026-09-12).
Data as JSON: /api/errors/c787862d49c4d2c9.
Report an issue: GitHub.
Appendix: source
Thrown at StabilityMatrix.Core/Python/UvVenvRunner.cs:401
|| result.StandardError?.Contains("Package(s) not found", StringComparison.OrdinalIgnoreCase)
== true;
if (packageNotFound)
{
return null;
}
// Check return code
if (result.ExitCode != 0)
{
throw new ProcessException(
$"pip show failed with code {result.ExitCode}: {result.StandardOutput}, {result.StandardError}"
);
}
if (string.IsNullOrWhiteSpace(result.StandardOutput))
{
throw new ProcessException(
$"pip show returned no output for package '{packageName}': {result.StandardError}"
);
}
return PipShowResult.Parse(result.StandardOutput);
}
/// <summary>
/// Run a pip index command, return result as PipIndexResult.
/// </summary>
public async Task<PipIndexResult?> PipIndex(
string packageName,
string? indexUrl = null,
bool includePrerelease = false
)
{
if (!File.Exists(PipPath))
{View on GitHub (pinned to af93d6ef57)