mamba icon indicating copy to clipboard operation
mamba copied to clipboard

Support Micromamba instalation with winget (on Windows 10/11)

Open vasiljevic opened this issue 1 year ago • 9 comments

Micromamba is a great tool for standalone Python Conda envs and the winget package manager is bundled with Windows 11 and newer versions of Windows 10.

If we were able to install micromamba using winget we could make a simpe batch script to install a standalone Python env on any newer Windows desktop without non-trivial prerequirements.

A sample hypothetical batch script:

winget install -e --id Mamba.Micromamba
micromamba create -f env.yml

vasiljevic avatar Dec 28 '22 13:12 vasiljevic

Nice idea, do you know what needs to be done to support this?

jonashaag avatar Dec 28 '22 13:12 jonashaag

First, you need to provide a Windows binary installer for Micromamba either as MSIX, MSI or .exe application installer.

Then you have to specify some metadata and submit the package. I have found official instructions (but have never did it myself):

https://learn.microsoft.com/en-us/windows/package-manager/package

A I understand, as a GitHub community member you can submit an issue in the repo https://github.com/microsoft/winget-pkgs , select "New Package (Request/Submission)", and then you will get the form: image

vasiljevic avatar Dec 28 '22 15:12 vasiljevic

Would you be willing to come up with an initial version? Maybe we can ship the exe file directly without using an installer (since we don’t have any)

jonashaag avatar Dec 28 '22 16:12 jonashaag

Maybe we can ship the exe file directly without using an installer

I don't think so. An installer must register installed application, copy executable file(s) into Program Files (when installing for all users) or AppData\Local\Programs inside the home directory of the current user, set PATH (optionally), provide uninstall procedure, etc.

There are many tools to create Windows installers, but that's where my knowledge ends. I am even not sure which tool is good choice for a project like this.

Looks like we need help from someone who have experience with building Windows installers.

vasiljevic avatar Dec 28 '22 20:12 vasiljevic

Maybe there examples of similar programs in winget that we can copy paste.

jonashaag avatar Dec 29 '22 08:12 jonashaag

I have dig a little bit through other winget package requests in https://github.com/microsoft/winget-pkgs using this query:

https://github.com/microsoft/winget-pkgs/issues?q=is%3Aissue+is%3Acompleated+is%3Aclosed+label%3APackage-Request+%22Installer+URL%3A+https%3A%2F%2Fgithub.com%22

This project could be an useful example: https://github.com/aloneguid/clipnest

Clipnest use Nullsoft scriptable install system GitHub action: https://github.com/joncloud/makensis-action

Here is the action in the Clipnest's GitHub workflow file: https://github.com/aloneguid/clipnest/blob/master/.github/workflows/build.yml#L63

And here is the Nullsoft scriptable install system configuration file: https://github.com/aloneguid/clipnest/blob/master/install.nsi

Nullsoft scriptable install system homepage: https://nsis.sourceforge.io/

vasiljevic avatar Jan 02 '23 13:01 vasiljevic

I have found another useful example of an open source project that implements windows installers and have winget integrated into the release process. It is Neovim (https://github.com/neovim/neovim). Here are installation instructions for end users including winget option: https://github.com/neovim/neovim/wiki/Installing-Neovim

Looks like Neovim have switched from Nullsoft scriptable install system to Wix toolset (https://github.com/wixtoolset/). Here is the commit named "refactor(packaging): Windows: improve MSI, remove NSIS": https://github.com/neovim/neovim/commit/96b461a00042c13610a62545b17fb792eb17c12e

Mentioned commit also may be a good starting point for an exploration how Neovim implements windows installer build and winget publishing.

vasiljevic avatar Jan 19 '23 11:01 vasiljevic

Would be nice to up the priority on this. Just spent half a day trying to get Git Bash install working properly on Windows 11 but its not working as expected. Got as far as it modifying my .bash_profile but something isn't working right and running which micromamba on new fresh git bash (which I verified is running the .bash_profile code) doesn't find micromamba..

JDFagan avatar Oct 06 '23 22:10 JDFagan

As of today, micromamba is available at Mamba.Micromamba from winget. Can this be closed now?

carschandler avatar Mar 07 '24 14:03 carschandler