0

Anyone know how to solve this python tensorflow issue?

Traceback (most recent call last):
  File "lite_model_gen.py", line 6, in <module>
    from tflite_model_maker.config import ExportFormat
  File "/home/ubuntu/examples/tensorflow_examples/lite/model_maker/pip_package/src/tflite_model_maker/__init__.py", line 51, in <module>
    from tflite_model_maker import searcher
  File "/home/ubuntu/examples/tensorflow_examples/lite/model_maker/pip_package/src/tflite_model_maker/searcher/__init__.py", line 25, in <module>
    from tensorflow_examples.lite.model_maker.core.task.searcher import ExportFormat
  File "/home/ubuntu/examples/tensorflow_examples/lite/model_maker/pip_package/src/tensorflow_examples/lite/model_maker/core/task/searcher.py", line 30, in <module>
    from tensorflow_examples.lite.model_maker.core.utils import ondevice_scann_builder
  File "/home/ubuntu/examples/tensorflow_examples/lite/model_maker/pip_package/src/tensorflow_examples/lite/model_maker/core/utils/ondevice_scann_builder.py", line 17, in <module>
    from scann.proto import scann_pb2
  File "/home/ubuntu/bert_QA/env/lib/python3.8/site-packages/scann/__init__.py", line 2, in <module>
    from scann.scann_ops.py import scann_ops
  File "/home/ubuntu/bert_QA/env/lib/python3.8/site-packages/scann/scann_ops/py/scann_ops.py", line 23, in <module>
    _scann_ops_so = tf.load_op_library(
  File "/home/ubuntu/bert_QA/env/lib/python3.8/site-packages/tensorflow/python/framework/load_library.py", line 54, in load_op_library
    lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: /home/ubuntu/bert_QA/env/lib/python3.8/site-packages/scann/scann_ops/cc/_scann_ops.so: undefined symbol: _ZN4absl12lts_2021032416numbers_internal9kHexTableE

It occurs when I attempt to use the tflite_model_maker library. Corrupted or outdated shared library file?

Zero
  • 1

1 Answers1

0

Okay, I discovered it could be fixed by simply installing scann using pip:

pip install scann
Zero
  • 1
  • This solution didn't help in my case, and I get the same error. Any other suggestions mabye? – Orly Jun 15 '23 at 05:23