drux41001 2014-08-11 08:39
浏览 58
已采纳

Golang-如何运行引用包的命令

I am new to Golang, and trying to run a command from the following package:

https://github.com/ryanbressler/CloudForest

The command proposed in the Quick Start section of the package is:

growforest -train train.fm -rfpred forest.sf -target B:FeatureName

but I am not sure how to use the command.

I have cloned the package on my D drive, and tried running it in Ms-dos window and get an error:

d:\DATA-SCIENCE\Go>go run growforest -train train.fm -rfpred forest.sf -target B:FeatureName
go run: no go files listed

I also tried running the command inside a go file, but that doesn't work either:

package main

import (
    "github.com/ryanbressler/CloudForest"
)

func main() {
    growforest -train train.fm -rfpred forest.sf -target B:FeatureName
}

Can anyone help me understand how this is supposed to be used?

  • 写回答

1条回答 默认 最新

  • doulan8152 2014-08-11 08:42
    关注

    You need to install the package first

    go install
    

    Then the growforest command will be available in your GOPATH\bin (which should be part of your PATH environment variable)

    Ideally, you should do a go get github.com/ryanbressler/CloudForest, which will clone and build and install the repo in GOPATH/src/github.com/ryanbressler/CloudForest.
    See "Download and install packages and dependencies".

    From the README, you need to install specific parts of the project:

    go get github.com/ryanbressler/CloudForest
    go install github.com/ryanbressler/CloudForest/growforest
    go install github.com/ryanbressler/CloudForest/applyforest
    
    #optional utilities
    go install github.com/ryanbressler/CloudForest/leafcount
    go install github.com/ryanbressler/CloudForest/utils/nfold
    go install github.com/ryanbressler/CloudForest/utils/toafm
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 lammps拉伸应力应变曲线分析
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试,帮帮忙吧
  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建