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.

  • I am not aware of a package manager, but, since you can code, if you want to automate Windows, you simply can't beat the free Windwos scripting language AutoIt I have used it on & off for about 20 years now, and would reach to it for any scripting at all which is GUI based (Python for the rest of it). – Mawg says reinstate Monica Jan 29 '19 at 15:21
  • 3
    I am not sure the reason this question was closed. PackageManagement is a feature of Windows 10. The question, "Does Windows come with a package manager these days?", has an answer that falls within scope here at Super User – Ramhound Jan 29 '19 at 15:49
  • Yes, there is PackageManagement. It's one of the tags so you can browse for related questions. I can post my answer on how to install python since the question was closed :( – MC10 Jan 29 '19 at 15:49
  • .MSI is the closest thing to native support. PackageManagement also exists on Windows 10 which supports Chocolatey packages. .MSI support silent non-interactive mode by the way – Ramhound Jan 29 '19 at 15:49
  • In short, you'll need chocolatey so install it as a PackageProvider: Install-PackageProvider chocolatey. Then you can find the python package Find-Package python which shows it's provided by chocolatey. If you want python 2.7.x, the package name is python2. Install by Install-Package python – MC10 Jan 29 '19 at 15:53
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

| improve this answer | |
  • When you install the chocolatey version, does it install to the default %PATH%, or somewhere else? – voices Jan 30 '19 at 16:46
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.

| improve this answer | |
  • FYI: This probably won't be the best answer, I don't know. I'm just putting it out there as I'm discovering it, in case it's useful to somebody. – voices Jan 29 '19 at 16:09
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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.