查看: 3298|回复: 0

Cannot import tf-sentencepiece

[复制链接]

27

主题

37

帖子

116

积分

论坛管理

Rank: 4

积分
116
发表于 2018-10-13 11:03:42 | 显示全部楼层 |阅读模式
I have installed tf-sentencepiece with pip, and when I run the line:


import
tf_sentencepiece as tfs

I get the following error:


tensorflow
.python.framework.errors_impl.NotFoundError: /home/ubuntu/.local/lib/python2.7/site-packages/tf_sentencepiece/_sentencepiece_processor_ops.so: undefined symbol: _ZN10tensorflow20OpKernelConstruction21CtxFailureWithWarningEPKciRKNS_6StatusE

Any idea why I can't import the library? Thanks.

Answer
通过将tensorflow版本更改为1.10.0解决了这个问题。

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表