Closed evelinag closed 7 years ago
Ah, the sample looks to be running the old syntax. We updated to use Paket 4.x which changed the syntax, more details on #140
I'll follow up with the Azure Notebooks people to make sure the sample is updated. In the meantime I suggest using this:
Paket.Package
[ "MathNet.Numerics"
"MathNet.Numerics.FSharp"
]
#load "Paket.Generated.Refs.fsx"
as that works with old and new, alternatively using Paket generateScriptsForRootFolder directly is still supported but needs adjustments.
Thank you and thanks for the workaround, it actually looks better than using generateScriptsForRootFolder
directly.
Is there some way to use packages from github via paket using this syntax, or is it fixed to nuget?
Great, @sylvanc came up the approach, we like it too!
On the issue itself, there were two F# samples on Azure Notebooks. Only one had been updated with the new release. This has now been resolved so new notebooks will use compatible syntax
We're just wrapping up a Paket Dependencies object, then making a call into add https://fsprojects.github.io/Paket/paket-add.html it looks like they might be considering adding other support here https://github.com/fsprojects/Paket/issues/2057
It would be great to provide a nice way to access the GitHub dependencies within a Jupyter Notebook.
Closing this, I've open #147 for tracking getting support for other dependency types
@cgravill - was the ability to load packages into IfSharp notebooks from github ever added, in the end? I wanted to take a crack at installing the newly open-sourced https://github.com/dotnet/infer. Thanks for any advice.
Apologies. As it turns out, we don't need to access Infer.NET
from github, because it is on nuget, here: https://www.nuget.org/packages/Microsoft.ML.Probabilistic/
So the standard nuget approach works:
Paket.Package
[ "Microsoft.ML.Probabilistic -Version 0.3.1810.501"
]
Very handy.
@roguetrainer no problem glad you figured out an approach. BTW I hadn't realised embedding the version number in the name works. What I use is (not explicitly tested):
Paket.Version ["Microsoft.ML.Probabilistic", "0.3.1810.501"]
Also, in case you're interested, then the files from GitHub was implemented (by @lucymukh in #179) . As an example what you can do is:
With thanks to @mndrake :)
Very helpful example. Thanks @mndrake & @cgravill.
Except, @mndrake & @cgravill, I tried the following,
Paket.GitHub ["dotnet/infer src/FSharpWrapper/FSharpWrapper.fs"]
and there are no errors. But I cannot find the file to load!? Will keep looking...
#load "paket-files/dotnet/infer/src/FSharpWrapper/FSharpWrapper.fs"
@mndrake & @cgravill. Sorry. Found it:
./IfSharp/bin/paket-files/github/dotnet/infer/src/FSharpWrapper/FSharpWrapper.fs
FYI, the path to DeedleFormat.fs
that works is slightly different to yours Colin:
#load "paket-files/
github
/mndrake/IfSharpLab/src/DeedleFormat.fs"
Ah thanks for the reminder, I might have a stale file from an earlier version of Paket.
Description
When running the official F# tutorial "FSharp for Azure Notebooks", I'm getting an error when downloading packages with Paket.
Repro steps
Actual behavior
After running the second cell containing
I'm getting the following:
It seems that the function that generates load scripts has changed.