我是新用户,我正在尝试此命令。
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)
我知道这似乎是一个微不足道的问题,但我坚持不懈。
答案 0 :(得分:1)
如果要编译和安装的代码在master
分支中不是(默认情况下由go get
检出),而是only in the go
branch of that repo,请尝试和:
cd $GOPATH/github.com/tensorflow/tensorflow
git checkout go
然后再次尝试编译。