【发布时间】:2021-08-11 09:15:59
【问题描述】:
导入 Top2vec(在 colab 笔记本中)时遇到问题。 重现它:
pip install top2vec[sentence_encoders]
重启运行时加载新模块,然后
from top2vec import Top2Vec
它显示了这个错误:
---------------------------------------------------------------------------
NotFoundError Traceback (most recent call last)
<ipython-input-8-9a81163f0da9> in <module>()
----> 1 from top2vec import Top2Vec
5 frames
/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/load_library.py in load_op_library(library_filename)
55 RuntimeError: when unable to load the library or get the python wrappers.
56 """
---> 57 lib_handle = py_tf.TF_LoadLibrary(library_filename)
58 try:
59 wrappers = _pywrap_python_op_gen.GetPythonWrappers(
NotFoundError: /usr/local/lib/python3.7/dist-packages/tensorflow_text/python/metrics/_text_similarity_metric_ops.so: undefined symbol: _ZN10tensorflow15OpKernelContext15allocate_outputEN4absl14lts_2020_09_2311string_viewERKNS_11TensorShapeEPPNS_6TensorE
我找到了说明您应该安装的解决方案
pip install -U tensorflow==2.3.0 但是这个版本不兼容top2vec
【问题讨论】:
标签: python tensorflow pip google-colaboratory