去安装 Apache Arrow。

huangapple go评论113阅读模式
英文:

go install apache arrow

问题

我是一个初学者,正在尝试安装Go Apache Arrow模块,以便能够运行user guide中的入门示例。当我尝试安装该库时,我收到以下错误信息:

$ go install github.com/apache/arrow/go@latest
go: github.com/apache/arrow/go@latest: 
找到模块 github.com/apache/arrow@latest (v0.0.0-20220326002331-5bd4d8ec279d),
但不包含包 github.com/apache/arrow/go

$ go install github.com/apache/arrow/go@v7.0.0
go: github.com/apache/arrow/go@v7.0.0: github.com/apache/arrow/go@v7.0.0: 
无效的版本: go/go.mod 在版本 go/v7.0.0 中具有后续的模块路径
"github.com/apache/arrow/go/v7" at revision go/v7.0.0

我已成功安装其他Go包,所以我不明白为什么这个安装会出错。

正确的"go install"调用是什么,以安装Apache Arrow?

英文:

I'm a beginning go user trying to install the go apache arrow module, so I can run the introductory examples in the user guide. When I try to install the library, I receive the following errors:

$ go install github.com/apache/arrow/go@latest
go: github.com/apache/arrow/go@latest: 
module github.com/apache/arrow@latest found (v0.0.0-20220326002331-5bd4d8ec279d), 
but does not contain package github.com/apache/arrow/go

$ go install github.com/apache/arrow/go@v7.0.0
go: github.com/apache/arrow/go@v7.0.0: github.com/apache/arrow/go@v7.0.0: 
invalid version: go/go.mod has post-v7 module path
"github.com/apache/arrow/go/v7" at revision go/v7.0.0

I've been able to install other go packages successfully, so I don't understand why this install is erroring out.

What is the correct invocation of "go install" to install apache arrow?

答案1

得分: 2

有一个简单的方法:假设你已经在本地项目中执行了 go mod init,你可以开始编写一个文件并导入 github.com/apache/arrow/go/v8,就像这个例子一样:

https://github.com/apache/arrow/blob/master/go/arrow/_examples/helloworld/main.go

现在你可以轻松地执行以下操作:

go mod tidy && go mod vendor

这个工具应该能够识别要下载和打包的导入项。

或者你可以在项目目录中明确执行以下操作:

go get -u github.com/apache/arrow/go/v8

然后运行 mod tidy 和 mod vendor。

英文:

There is an easy way: assume you have done go mod init in your local project, you can start to write a file and import github.com/apache/arrow/go/v8 Like this example:

https://github.com/apache/arrow/blob/master/go/arrow/_examples/helloworld/main.go

Now you can easily do

go mod tidy && go mod vendor

And the tool should recognize the imports to download and vendorize.

Or you can do explicitly in your project dir,

go get -u github.com/apache/arrow/go/v8

then run the mod tidy and mod vendor

huangapple
  • 本文由 发表于 2022年3月27日 01:04:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/71630133.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定