io icon indicating copy to clipboard operation
io copied to clipboard

Fail to use version 0.28.0 caused by undefined symbol

Open longern opened this issue 3 years ago • 2 comments

I installed tensorflow-io 0.28.0 with pip in tensorflow 2.11.0 docker image. However, when using ArrowStreamDataset, the following exception was thrown:

Traceback (most recent call last):
...
    arrow_io.ArrowStreamDataset("", [], (tf.float32))
  File "/usr/local/lib/python3.8/dist-packages/tensorflow_io/python/ops/arrow_dataset_ops.py", line 460, in __init__
    partial(core_ops.io_arrow_stream_dataset, endpoints),
  File "/usr/local/lib/python3.8/dist-packages/tensorflow_io/python/ops/__init__.py", line 88, in __getattr__
    return getattr(self._load(), attrb)
  File "/usr/local/lib/python3.8/dist-packages/tensorflow_io/python/ops/__init__.py", line 84, in _load
    self._mod = _load_library(self._library)
  File "/usr/local/lib/python3.8/dist-packages/tensorflow_io/python/ops/__init__.py", line 69, in _load_library
    raise NotImplementedError(
NotImplementedError: unable to open file: libtensorflow_io.so, from paths: ['/usr/local/lib/python3.8/dist-packages/tensorflow_io/python/ops/libtensorflow_io.so']
caused by: ['/usr/local/lib/python3.8/dist-packages/tensorflow_io/python/ops/libtensorflow_io.so: undefined symbol: _ZNK10tensorflow4data11DatasetBase8FinalizeEPNS_15OpKernelContextESt8functionIFNS_8StatusOrISt10unique_ptrIS1_NS_4core15RefCountDeleterEEEEvEE']

Installing tensorflow through pypi does not trigger this error.

longern avatar Nov 22 '22 06:11 longern

Something similar is happening for me:

/home/user/workspace/.venvs/xflow/lib/python3.8/site-packages/tensorflow_io/python/ops/__init__.py:98: UserWarning: unable to load libtensorflow_io_plugins.so: unable to open file: libtensorflow_io_plugins.so, from paths: ['/home/user/workspace/.venvs/xflow/lib/python3.8/site-packages/tensorflow_io/python/ops/libtensorflow_io_plugins.so']
caused by: ['/home/user/workspace/.venvs/xflow/lib/python3.8/site-packages/tensorflow_io/python/ops/libtensorflow_io_plugins.so: undefined symbol: _ZN3tsl5mutexC1Ev']
  warnings.warn(f"unable to load libtensorflow_io_plugins.so: {e}")
/home/user/workspace/.venvs/xflow/lib/python3.8/site-packages/tensorflow_io/python/ops/__init__.py:104: UserWarning: file system plugins are not loaded: unable to open file: libtensorflow_io.so, from paths: ['/home/user/workspace/.venvs/xflow/lib/python3.8/site-packages/tensorflow_io/python/ops/libtensorflow_io.so']
caused by: ['/home/user/workspace/.venvs/xflow/lib/python3.8/site-packages/tensorflow_io/python/ops/libtensorflow_io.so: undefined symbol: _ZNK10tensorflow4data11DatasetBase8FinalizeEPNS_15OpKernelContextESt8functionIFN3tsl8StatusOrISt10unique_ptrIS1_NS5_4core15RefCountDeleterEEEEvEE']
  warnings.warn(f"file system plugins are not loaded: {e}")

thoomi avatar Dec 01 '22 16:12 thoomi

Similar with tensorflow 0.28.0. Packages are installed using pip (not a conda environment).

tensorboard 2.10.0 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.8.1 tensorflow-cpu 2.10.0 tensorflow-estimator 2.10.0 tensorflow-io 0.28.0 tensorflow-io-gcs-filesystem 0.28.0

pip show tensorflow-io Name: tensorflow-io Version: 0.28.0 Summary: TensorFlow IO Home-page: https://github.com/tensorflow/io Author: Google Inc. Author-email: [email protected] License: UNKNOWN Location: /usr/local/lib/python3.8/dist-packages Requires: tensorflow-io-gcs-filesystem Required-by:

import tensorflow_io as tfio 2022-12-08 14:20:06.555129: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 AVX512F FMA To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. /usr/local/lib/python3.8/dist-packages/tensorflow_io/python/ops/init.py:98: UserWarning: unable to load libtensorflow_io_plugins.so: unable to open file: libtensorflow_io_plugins.so, from paths: ['/usr/local/lib/python3.8/dist-packages/tensorflow_io/python/ops/libtensorflow_io_plugins.so'] caused by: ['/usr/local/lib/python3.8/dist-packages/tensorflow_io/python/ops/libtensorflow_io_plugins.so: undefined symbol: _ZN3tsl5mutexC1Ev'] warnings.warn(f"unable to load libtensorflow_io_plugins.so: {e}") /usr/local/lib/python3.8/dist-packages/tensorflow_io/python/ops/init.py:104: UserWarning: file system plugins are not loaded: unable to open file: libtensorflow_io.so, from paths: ['/usr/local/lib/python3.8/dist-packages/tensorflow_io/python/ops/libtensorflow_io.so'] caused by: ['/usr/local/lib/python3.8/dist-packages/tensorflow_io/python/ops/libtensorflow_io.so: undefined symbol: _ZNK10tensorflow4data11DatasetBase8FinalizeEPNS_15OpKernelContextESt8functionIFN3tsl8StatusOrISt10unique_ptrIS1_NS5_4core15RefCountDeleterEEEEvEE'] warnings.warn(f"file system plugins are not loaded: {e}")

CheaterAdams avatar Dec 08 '22 16:12 CheaterAdams