python - 无法导入 tf 句子 - 原因 : image not found

标签 python tensorflow

尝试导入库 tf_sentencepiece 以便使用以下 link 。使用 macOS ,已经通过 pip 安装了库并得到了:

pip install tf_sentencepiece
Requirement already satisfied: tf_sentencepiece in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (0.1.82)

导入库时,我收到错误消息:

NotFoundError: dlopen(/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tf_sentencepiece/_sentencepiece_processor_ops.so.1.13.1, 6): Library not loaded: @rpath/libtensorflow_framework.so
  Referenced from: /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tf_sentencepiece/_sentencepiece_processor_ops.so.1.13.1
  Reason: image not found.

我还收到警告警报:

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tf_sentencepiece/sentencepiece_processor_ops.py:38: UserWarning: No so file is found for [1.14.0] from [1.12.0, 1.11.0, 1.8.0, 1.7.0, 1.10.0, 1.9.0, 1.13.1]
  ', '.join(versions)))
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tf_sentencepiece/sentencepiece_processor_ops.py:39: UserWarning: use the latest version 1.13.1
  warnings.warn('use the latest version %s' % (latest))

知道可能出现什么问题吗?

最佳答案

将tensorflow降级到版本1.13.1可以解决该问题。由于库 tf_sentencepiece 支持 TensorFlow 至版本 1.13.1 。

关于python - 无法导入 tf 句子 - 原因 : image not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57073609/

相关文章:

python - 在 Pandas Series 中删除带有标签条件的行

python - 广播/迭代字典值的有效方法

Python调用和控制台输出问题

python - 针对神经网络 tensorflow 的 1 个标签使用多个实例预处理数据

TensorFlow - 获取张量的变量范围?

python - 如何将 wsse :Security, UsernameToken header 添加到 ZSI、Python 中的 SOAP 请求?

python - Django 数据层次结构问题

tensorflow - 在 Windows 上从源代码构建 Tensorflow 2.0 失败 "Could not find bazel-bin"

python - Tensorflow reshape 张量

python - 使用tensorflow时ssd_mobilenet_v1_coco的label map file(pbtxt)在哪里可以找到?