英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论