2 回答
TA貢獻(xiàn)1777條經(jīng)驗(yàn) 獲得超3個(gè)贊
安裝軟件包格萊學(xué)
示例構(gòu)建,在 /家/名稱/tmp/ 中
git clone https://github.com/sjwhitworth/golearn.git
cd golearn/
## Completing the installation
## Run the following to complete installation
go get -t -u -v ./...
使用:請(qǐng)(也)閱讀 README.md 的文本文件。
TA貢獻(xiàn)1797條經(jīng)驗(yàn) 獲得超6個(gè)贊
golearn的指令可能有些過時(shí),你可以按照我的流程:
cd到一個(gè)空的文件夾中,就像 一樣,下面的所有命令都應(yīng)該在這個(gè) floder 上運(yùn)行/home/your/code/my_golearn運(yùn)行初始化一個(gè) go 項(xiàng)目,你會(huì)得到一個(gè)文件
go mod init my_golearngo.mod創(chuàng)建一個(gè)文件,并用 https://github.com/sjwhitworth/golearn#getting-started 的代碼填充它
main.go跑
go get github.com/sjwhitworth/golearn運(yùn)行以獲取所有依賴項(xiàng)
go mod download運(yùn)行,這很奇怪,但是如果這個(gè)命令錯(cuò)過了就不起作用了,我想也許golearn的開發(fā)人員對(duì)go mod有一些誤用
go get github.com/sjwhitworth/golearn/knn運(yùn)行以獲取所需的數(shù)據(jù)集
wget https://raw.githubusercontent.com/sjwhitworth/golearn/master/examples/datasets/iris.csv -P datasets運(yùn)行 ,您將獲得與 https://github.com/sjwhitworth/golearn#getting-started 相同的結(jié)果
go run ./main.go
如果您不熟悉如何在現(xiàn)代圍棋項(xiàng)目中安裝依賴項(xiàng),最好先了解 https://go.dev/blog/using-go-modules
- 2 回答
- 0 關(guān)注
- 97 瀏覽
添加回答
舉報(bào)
