Yak Package Manager Freeze

Hi @will,

I was wondering if it is possible to export the list of packages installed via the package manager and use that list on another machine to install, very much like Python’s pip freeze. I would need such functionality to transfer a list of installed plug-ins to the IT department of our university. Unfortunately Custom Package Repositories is not a viable option for me.

Furthermore, I am having trouble using YAK while still having to use Rhino6 and Rhino7 both on the same machine. After installing packages via YAK I’m getting the duplicate package error when starting GH in RH7. When I remove the package from \AppData\Roaming\Grasshopper\Libraries\ folder and leave it in \AppData\Roaming\McNeel\Rhinoceros\packages\7.0\, it is obviously not available anymore in RH6. On my local machine I am symlinking from \AppData\Roaming\Grasshopper\Libraries\7.0 to \AppData\Roaming\McNeel\Rhinoceros\packages\7.0\. This works for me, but it is impossible to explain to students. Any better (easier) ideas?

The symlink works only for RH6, since with RH7 GH loading I get the duplicate issue again. I had to remove it. Is there any other way to use YAK with a RH6/7 dual install?

Thanks for reading this far.

You can run yak.exe list to get a list of the packages currently installed.

The Yak CLI doesn’t have an “install from list in file” mechanism, but you can easily use yak.exe in a script to accomplish the same thing. For example…

# yak-requirements.txt
# yak-setup.ps1
param ([Parameter(Mandatory)]$file)

Get-Content $file | ForEach-Object {
  & "C:\Program Files\Rhino 7\System\Yak.exe" install $_

…and finally, run it like this…

.\yak-setup.ps1 yak-requirements.txt

I’m afraid I don’t have a workaround for the Rhino 6/7 conflicts. I wonder if we can fix it on our end so that Grasshopper silently picks one in the case of a Package Manager vs Libraries folder GHA conflict - probably favouring the former.

1 Like

@will many thanks for the ps script!

As for the 6/7 conflict. Why not establish a dedicated GH plugin folder for each Rhino version? Since GH now ships with Rhino, this makes sense to my mind.