Search code examples
windowsinstallationcmdpackagechocolatey

Package installation failure when trying to upgrade Python by using Chocolatey


I tried to upgrade python through Chocolatey because I had a problem with VScode, VScode doesn't recognize python but I have it installed on my pc. The problem is that when Chocolatey asked me about if I want to run all the script to install the files, I accidently put N and enter and one of the packages didn't installed, is there something I should do? Because I think this could be a problem in the future but I don't really know, the message is the following:

Chocolatey upgraded 12/13 packages. 1 packages failed. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Upgraded:

  • chocolatey-compatibility.extension v1.0.0
  • chocolatey-core.extension v1.4.0
  • chocolatey-windowsupdate.extension v1.0.5
  • KB2919442 v1.0.20160915
  • KB2999226 v1.0.20181019
  • KB3033929 v1.0.5
  • KB3035131 v1.0.3
  • python v3.11.5
  • python3 v3.11.5
  • python311 v3.11.5
  • vcredist140 v14.36.32532
  • vcredist2015 v14.0.24215.20170201

Packages requiring reboot:

  • vcredist140 (exit code 3010)

The recent package changes indicate a reboot is necessary. Please reboot at your earliest convenience.

Failures

  • KB2919355 - User canceled powershell portion of installation for 'C:\ProgramData\chocolatey\lib\KB2919355\tools\ChocolateyInstall.ps1'. Specify -n to skip automated script actions.

C:\Windows\System32>choco upgrade python Chocolatey v2.2.2 Upgrading the following packages: python By upgrading, you accept licenses for the packages. python v3.11.5 is the latest version available based on your source(s).

Chocolatey upgraded 0/1 packages. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

I tried:

  • Searching for help by looking at the exit code on Google.
  • Tried to run again the upgrade.

I hope someone can help me with this.


Solution

  • If you are running a modern operating system (ie. an up-to-date Windows 10) that failed package isn't an issue.

    However, to make everything normalized on your system run choco install KB2919355.

    Note that the failing package would have made no difference to installing / running Python.