问题描述
限时送ChatGPT账号..问题:
在github:
import (运行"不安全"github/golang/protobuf/proto"tfpbgithub/tensorflow/tensorflow/tensorflow/go/genop/internal/proto/github/tensorflow/tensorflow/tensorflow/go/core")
这是什么(tfpbgithub/tensorflow/tensorflow/tensorflow/go/genop/internal/proto/github/tensorflow/tensorflow/tensorflow/go/core")?我在任何地方都找不到它,我的程序也可以我该如何解决这个问题
有详细说明:今天我尝试为Go安装tensorflow并执行它,我使用这个cmd:
去github/tensorflow/tensorflow/tensorflow/go
然后我测试 tf for go:
去测试github/tensorflow/tensorflow/tensorflow/go
(根据本网站:tensorflow)
但我收到了这条消息:
<块引用>在以下任何一个中找不到包github/tensorflow/tensorflow/tensorflow/go/genop/internal/proto/github/tensorflow/tensorflow/tensorflow/go/core":/home/go/src/github/tensorflow/tensorflow/tensorflow/go/genop/internal/proto/github/tensorflow/tensorflow/tensorflow/go/core(来自$GOROOT)
/home/go_work/src/github/tensorflow/tensorflow/tensorflow/go/genop/internal/proto/github/tensorflow/tensorflow/tensorflow/go/core(来自$GOPATH)
然后我访问github然后我找不到这个路径,我该如何解决这个问题?谢谢你们.
解决方案你可以在 Github 上查看类似的 issue:23257
因此,没有记录在案的适当修复程序,在那之前您可以尝试一下.我使用以下方式解决了我的错误:
运行go get github/tensorflow/tensorflow/tensorflow/go
package github/tensorflow/tensorflow/tensorflow/go/genop/internal/proto/github/tensorflow/tensorflow/tensorflow/go/core:找不到包github/tensorflow/tensorflow/tensorflow/go/genop/internal/proto/github/tensorflow/tensorflow/tensorflow/go/core"中的任何一个:/usr/local/Cellar/go/1.13.5/libexec/src/github/tensorflow/tensorflow/tensorflow/go/genop/internal/proto/github/tensorflow/tensorflow/tensorflow/go/core(来自$GOROOT)/Users/subhamsarkar/go/src/github/tensorflow/tensorflow/tensorflow/go/genop/internal/proto/github/tensorflow/tensorflow/tensorflow/go/core(来自$GOPATH)
上面的 get 肯定找不到所说的包,但是 repo 已经克隆到你的 GOPATH
cd $GOPATH/src/github/tensorflow/tensorflow/tensorflow/go
git checkout r1.11
现在再次运行,
去github/tensorflow/tensorflow/tensorflow/go
<块引用>
原因:讨论
此外,我相信您已经安装了 TensorFlow Go 包
所需的 TensorFlow C 库
.
注意:我在
上测试过<块引用>操作系统:MacOSX 10.15.2
Go 版本:go1.13.5 darwin/amd64
problem:
in github:
import (
"runtime"
"unsafe"
"github/golang/protobuf/proto"
tfpb "github/tensorflow/tensorflow/tensorflow/go/genop/internal/proto/github/tensorflow/tensorflow/tensorflow/go/core"
)
what's this(tfpb "github/tensorflow/tensorflow/tensorflow/go/genop/internal/proto/github/tensorflow/tensorflow/tensorflow/go/core") ? I cannot find it in anywhere , so can my program How can I solve this problem
there is details: today I try to install tensorflow for Go and execute it, I use this cmd:
go get github/tensorflow/tensorflow/tensorflow/go
then i test tf for go:
go test github/tensorflow/tensorflow/tensorflow/go
(according with this site: tensorflow)
but i got this message:
cannot find package "github/tensorflow/tensorflow/tensorflow/go/genop/internal/proto/github/tensorflow/tensorflow/tensorflow/go/core" in any of: /home/go/src/github/tensorflow/tensorflow/tensorflow/go/genop/internal/proto/github/tensorflow/tensorflow/tensorflow/go/core (from $GOROOT)
/home/go_work/src/github/tensorflow/tensorflow/tensorflow/go/genop/internal/proto/github/tensorflow/tensorflow/tensorflow/go/core (from $GOPATH)
then i visit github then i cannot find this path , How can I solve this problem? thanks for you guys.!
解决方案You can look at the similar issue on Github: 23257
So, there's no proper fix out there which is documented, until then you can try this out. I resolved my error using the following way:
Rungo get github/tensorflow/tensorflow/tensorflow/go
package github/tensorflow/tensorflow/tensorflow/go/genop/internal/proto/github/tensorflow/tensorflow/tensorflow/go/core: cannot find package "github/tensorflow/tensorflow/tensorflow/go/genop/internal/proto/github/tensorflow/tensorflow/tensorflow/go/core" in any of:
/usr/local/Cellar/go/1.13.5/libexec/src/github/tensorflow/tensorflow/tensorflow/go/genop/internal/proto/github/tensorflow/tensorflow/tensorflow/go/core (from $GOROOT)
/Users/subhamsarkar/go/src/github/tensorflow/tensorflow/tensorflow/go/genop/internal/proto/github/tensorflow/tensorflow/tensorflow/go/core (from $GOPATH)
Above get surely fails to find the said package, but the repo is already cloned to your
GOPATH
cd $GOPATH/src/github/tensorflow/tensorflow/tensorflow/go
git checkout r1.11
Now again run,
go get github/tensorflow/tensorflow/tensorflow/go
Reason: Discussion
Also, I believe you have installed the TensorFlow C library
which is required for the TensorFlow Go package
.
Note: I tested on
OS: MacOSX 10.15.2
Go version: go1.13.5 darwin/amd64
这篇关于发现saved_model.go导入路径出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论