小编典典

无法使用Go正确获取

go

我是一个新用户,正在尝试此命令。

go get github.com/tensorflow/tensorflow/tensorflow/contrib/go

我得到这个错误

package github.com/tensorflow/tensorflow/tensorflow/contrib/go
    imports github.com/tensorflow/tensorflow/tensorflow/contrib/go
    imports github.com/tensorflow/tensorflow/tensorflow/contrib/go: cannot find package "github.com/tensorflow/tensorflow/tensorflow/contrib/go" in any of:
    /usr/lib/go/src/pkg/github.com/tensorflow/tensorflow/tensorflow/contrib/go (from $GOROOT)
    /home/arafat/go/src/github.com/tensorflow/tensorflow/tensorflow/contrib/go (from $GOPATH)

我知道这似乎是一个琐碎的问题,但我坚持下去。


阅读 292

收藏
2020-07-02

共1个答案

小编典典

如果编译和安装的代码是 不是master分支(签出由默认值go get),但只有在go该回购的分支,尝试:

cd $GOPATH/github.com/tensorflow/tensorflow
git checkout go

然后重试编译。

2020-07-02