3

我正在尝试CsvProvider在 XUbuntu 上运行标准示例。但是我收到一个错误,说JsonProvider缺少对Fsharp.Core 2.3.5. 所以,我尝试在本地安装它paket(我使用的是 Atom 和 Ionide)。但它说那个包不存在。不知道在这里做什么。

我试图运行的代码:

#r "packages/FSharp.Data/lib/portable-net40+sl5+wp8+win8/FSharp.Data.dll"
open FSharp.Data

type Stocks = CsvProvider<"./data/MSFT.csv">

let msft = Stocks.Load("http://ichart.finance.yahoo.com/table.csv?s=MSFT")

// Look at the most recent row. Note the 'Date' property
// is of type 'DateTime' and 'Open' has a type 'decimal'
let firstRow = msft.Rows |> Seq.head
let lastDate = firstRow.Date
let lastOpen = firstRow.Open

// Print the prices in the HLOC format
for row in msft.Rows do
  printfn "HLOC: (%A, %A, %A, %A)" row.High row.Low row.Open row.Close

我得到的错误:

The type provider 'ProviderImplementation.JsonProvider' reported
an error: The type provider constructor has thrown an exception:
Could not load file or assembly 'FSharp.Core, Version=2.3.5.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of
its dependencies

我正在尝试安装的 nuget 包:

source https://www.nuget.org/api/v2
nuget FAKE
nuget FSharp.Data
nuget FSharp.Core
nuget FSharp.Core.Open.FS30 2.3.5 //<- this is the line that fails.

运行时出现错误消息sudo mono .paket/paket.exe install

Paket failed with:
    Couldn't get package details for package
    FSharp.Core.Open.FS30 2.3.5 on https://www.nuget.org/api/v2.

我在哪里看到这应该是一个很好的安装包

https://github.com/fsharp/fsharp/issues/165
4

0 回答 0