6

Does Windows come with a package manager these days? I haven't used Windows in years. I'm hoping it has something similar to yum, apt, pacman, etc. found on various Linux distros. Obviously Windows isn't Linux, but it sounds like Windows and PowerShell etc. have come a long way.

I'd like to be able to automate the installation of a current version of Python for instance, from a batch script without all the monotonous GUI navigation. That kind of thing.

Mokubai
  • 95,412
voices
  • 2,881

3 Answers3

6

Yes, Windows 10 PowerShell has PackageManagement. For python, I believe you need to install chocolatey as a package provider first.

Here is how I was able to install python using PackageManagement.

  1. Run PowerShell as administrator
  2. Install-PackageProvider chocolatey

Install chocolatey

  1. Find-Package python

Find python This shows python 3.7.2, if you want python 2.7.x, use python2.

  1. Install-Package python

Install python

MC10
  • 10,620
2

I stumbled across a PowerShell module called OneGet or PackageMagement.

You can do things like:

PowerShell GetPackageSource
PowerShell Find-Package Python3
PowerShell Install-Package Python3

You can bypass interaction and automate package download & installation like:

PowerShell Install-Package -Scope CurrentUser -Force Python3

I'm still figuring it out, not sure how well it works exactly, just yet.

voices
  • 2,881
1

Does Windows come with a package manager these days?

It's called PackageManagement. It is a feature of the Windows Management Framework 5.1 which (PowerShell 5.1) is installed by default on Windows 10.

PackageManagement supports Chocolatey packages.

PackageManagement

Ramhound
  • 44,080