RuntimeError: Graph ops missing from the python registry ({'SentencepieceEncodeSparse'}) are also absent from the c++ registry

Viewed 2146

I am trying to use sentecepiece in the Windows system while implementing universal sentence encoder as described in tensorflow.

But I am getting below error:

RuntimeError: Graph ops missing from the python registry ({'SentencepieceEncodeSparse'}) are also absent from the c++ registry.

I know this library has been supported now:

I tried installing sentencepiece using pip install --user sentencepiece with many versions too. I can import sentencepiece, but get an error RuntimeError: Graph ops missing from the python registry ({'SentencepieceEncodeSparse'}) are also absent from the C++ registry.

I also tried conda install tf_sentencepiece, but it throws an error: anaconda3\lib\site-packages\tf_sentencepiece\_sentencepiece_processor_ops. So it is either not designed to run on Windows or it contains an error.


NotFoundError                             Traceback (most recent call last)
<ipython-input-62-956b40af1330> in <module>
----> 1 import tf_sentencepiece

~\AppData\Local\Continuum\anaconda3\lib\site-packages\tf_sentencepiece\__init__.py in <module>
      3 from __future__ import print_function
      4 
----> 5 from tf_sentencepiece.sentencepiece_processor_ops import *

~\AppData\Local\Continuum\anaconda3\lib\site-packages\tf_sentencepiece\sentencepiece_processor_ops.py in <module>
     25 
     26 _gen_sentencepiece_processor_op = tf.load_op_library(
---> 27     os.path.join(os.path.dirname(__file__), '_sentencepiece_processor_ops.so'))
     28 
     29 

~\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow\python\framework\load_library.py in load_op_library(library_filename)
     59     RuntimeError: when unable to load the library or get the python wrappers.
     60   """
---> 61   lib_handle = py_tf.TF_LoadLibrary(library_filename)
     62 
     63   op_list_str = py_tf.TF_GetOpList(lib_handle)

NotFoundError: C:\Users\AUSER\AppData\Local\Continuum\anaconda3\lib\site-packages\tf_sentencepiece\_sentencepiece_processor_ops.so not found
1 Answers
Related