chocolatey/choco · error · NotImplementedException
Alternative sources do not allow the use of the 'all' packag
Error message
Alternative sources do not allow the use of the 'all' package name/keyword.
What it means
PythonService.Install rejects the 'all' keyword: alternative sources (Python/pip) cannot install all packages. If config.PackageNames equals ApplicationParameters.AllPackages it throws NotImplementedException immediately, before building any arguments.
Source
Thrown at src/chocolatey/infrastructure.app/services/PythonService.cs:364
}
public void InstallDryRun(ChocolateyConfiguration config, Action<PackageResult, ChocolateyConfiguration> continueAction)
{
EnsureExecutablePathSet();
var args = BuildArguments(config, _installArguments);
this.Log().Info("Would have run '{0} {1}'".FormatWith(_exePath.EscapeCurlyBraces(), args.EscapeCurlyBraces()));
}
public ConcurrentDictionary<string, PackageResult> Install(ChocolateyConfiguration config, Action<PackageResult, ChocolateyConfiguration> continueAction)
{
return Install(config, continueAction, beforeModifyAction: null);
}
public ConcurrentDictionary<string, PackageResult> Install(ChocolateyConfiguration config, Action<PackageResult, ChocolateyConfiguration> continueAction, Action<PackageResult, ChocolateyConfiguration> beforeModifyAction)
{
if (config.PackageNames.IsEqualTo(ApplicationParameters.AllPackages))
{
throw new NotImplementedException("Alternative sources do not allow the use of the 'all' package name/keyword.");
}
EnsureExecutablePathSet();
var args = BuildArguments(config, _installArguments);
var packageResults = new ConcurrentDictionary<string, PackageResult>(StringComparer.InvariantCultureIgnoreCase);
foreach (var packageToInstall in config.PackageNames.Split(new[] { ApplicationParameters.PackageNamesSeparator }, StringSplitOptions.RemoveEmptyEntries))
{
var pkgName = packageToInstall;
if (!string.IsNullOrWhiteSpace(config.Version))
{
pkgName = "{0}=={1}".FormatWith(packageToInstall, config.Version);
}
var argsForPackage = args.Replace(PackageNameToken, pkgName);
var exitCode = _commandExecutor.Execute(
_exePath,
argsForPackage,
View on GitHub (pinned to 0d5abdd10c)
Solutions
- List and install explicit package names with the Python source
- Do not pass 'all' to alternative (Python/Ruby/Cygwin/WindowsFeatures) sources
- Loop over a package list in your script instead of using 'all'
Example fix
// before choco install all --source=python // after choco install requests flask --source=python
Defensive patterns
Strategy: validation
Validate before calling
if (config.PackageNames == ApplicationParameters.AllPackages) {
throw new ArgumentException("The Python source does not support 'all'; pass explicit package names.");
} Try / catch
try { pythonService.Install(config); }
catch (NotImplementedException ex) when (ex.Message.Contains("'all'")) {
logger.Error(ex.Message); // pass explicit names
} Prevention
- Never pass 'all' to the Python (or other alternative) source
- Enumerate packages explicitly in scripts
- Validate PackageNames against the source type before invoking
When it happens
Trigger: Calling choco install with PackageNames == 'all' against the Python source (SourceTypes.Python).
Common situations: A script reuses an 'all' package-name variable across sources; misunderstanding that the pip source is per-package; copy-paste from a NuGet-style 'all' command.
Related errors
- Installing all packages from {0} is not supported.{1}Only in
- Alternative sources do not allow the use of the 'all' packag
- Package name is required. Please pass at least one package n
- Force dependencies can only be used with force also turned o
- It appears you are attempting to use options that may be onl
AI-assisted analysis of chocolatey/choco@0d5abdd10c (2026-08-13).
Data as JSON: /api/errors/e2bdb4e46b6b99f7.
Report an issue: GitHub.