安装软件包信息

我正在尝试按照这些说明安装软件包去学习。

在终端中运行后

go get -t -u -v github.com/sjwhitworth/golearn

我试图运行(根据需要):

cd $GOPATH/src/github.com/sjwhitworth/golearn

但是,bash 找不到这个目录。我该怎么办?(我使用的是操作系统)


烙印99
浏览 81回答 2
2回答

慕森王

安装软件包格莱学示例构建,在 /家/名称/tmp/ 中git clone https://github.com/sjwhitworth/golearn.gitcd golearn/        ## Completing the installation        ## Run the following to complete installationgo get -t -u -v ./...使用:请(也)阅读 README.md 的文本文件。

FFIVE

golearn的指令可能有些过时,你可以按照我的流程:cd到一个空的文件夹中,就像 一样,下面的所有命令都应该在这个 floder 上运行/home/your/code/my_golearn运行初始化一个 go 项目,你会得到一个文件go mod init my_golearngo.mod创建一个文件,并用 https://github.com/sjwhitworth/golearn#getting-started 的代码填充它main.go跑go get github.com/sjwhitworth/golearn运行以获取所有依赖项go mod download运行,这很奇怪,但是如果这个命令错过了就不起作用了,我想也许golearn的开发人员对go mod有一些误用go get github.com/sjwhitworth/golearn/knn运行以获取所需的数据集wget https://raw.githubusercontent.com/sjwhitworth/golearn/master/examples/datasets/iris.csv -P datasets运行 ,您将获得与 https://github.com/sjwhitworth/golearn#getting-started 相同的结果go run ./main.go如果您不熟悉如何在现代围棋项目中安装依赖项,最好先了解 https://go.dev/blog/using-go-modules
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Go