2 回答

TA貢獻1777條經驗 獲得超3個贊
安裝軟件包格萊學
示例構建,在 /家/名稱/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 ./...
使用:請(也)閱讀 README.md 的文本文件。

TA貢獻1797條經驗 獲得超6個贊
golearn的指令可能有些過時,你可以按照我的流程:
cd
到一個空的文件夾中,就像 一樣,下面的所有命令都應該在這個 floder 上運行/home/your/code/my_golearn
運行初始化一個 go 項目,你會得到一個文件
go mod init my_golearn
go.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
- 2 回答
- 0 關注
- 92 瀏覽
添加回答
舉報