12

I have a tensorflow 2.2 conda environment setup with python 3.8.2 on Ubuntu.

I ran pip install tensorflow-io==0.14.0.

When I try to

import tensorflow-io as tfio

I get the erorr:

File "/home/somedir/miniconda3/envs/env_name/lib/python3.8/site-packages/tensorflow_io/core/python/ops/__init__.py", line 65, in _load_library
raise NotImplementedError(

NotImplementedError: unable to open file: libtensorflow_io.so, from paths: ['/home/somedir/miniconda3/envs/env_name/lib/python3.8/site-packages/tensorflow_io/core/python/ops/libtensorflow_io.so']

caused by: ['/home/somedir/miniconda3/envs/env_name/lib/python3.8/site-packages/tensorflow_io/core/python/ops/libtensorflow_io.so undefined symbol:
_ZN10tensorflow0pKernel11TraceStringEPNS_150pKernelContextEb']

What's the issue and how can I fix it?

user3731622
  • 4,844
  • 8
  • 45
  • 84

7 Answers7

9

As @Smedegaard mentioned, tensorflow_io is not on conda forge. The answer of vlasenkoalexey on Github issues to tackle this:

Obvious workaround is to uninstall tensorflow and tensorflow-io and install them from pip:
pip uninstall tensorflow
pip uninstall tensorflow-io
pip install tensorflow-gpu
pip install --no-deps tensorflow-io

vcucu
  • 184
  • 3
  • 12
2

Have you tried pip install tensorflow-io==0.13.0 ?

according to This TF has 2 version of TF io that can be compatibly installed with.

KobyCT
  • 21
  • 2
1

at 19 oct 2022, it is work with that versions

#!pip install tensorflow==2.8.0
#or
!pip install tensorflow-gpu==2.8.0
import tensorflow as tf

!pip install tensorflow-io==0.25.0   # что сломалось с ==0.26.0 
Nikolay L
  • 31
  • 2
1

I got the same error when I used the Conda environment with a Jupyter notebook and Windows 11.

I found the solution by finding compatible version tensorflow-io with Tensorflow: https://github.com/tensorflow/io#tensorflow-version-compatibility

In my case:

pip install tensorflow==2.10.0 tensorflow-io==0.27.0
Astrochamp
  • 5
  • 2
  • 5
Ahmet Ekiz
  • 31
  • 4
0

I got the same error in a Jupyter lab, running in a conda environment.

Looks like tensorflow_io is not on conda forge yet: https://github.com/tensorflow/io/issues/676

If possible you can change to a regular Python environment.

Smedegaard
  • 727
  • 1
  • 6
  • 18
0

Solution:

!pip install tensorflow_io==0.17.1

!pip install tensorflow==2.4.0

0

compatibility issue.

you can find list of all compatible version in github official website. https://github.com/tensorflow/io

TensorFlow I/O Version  TensorFlow Compatibility    Release Date
0.33.0  2.13.x  Aug 01, 2023
0.32.0  2.12.x  Mar 28, 2023
0.31.0  2.11.x  Feb 25, 2023
0.30.0  2.11.x  Jan 20, 2023
0.29.0  2.11.x  Dec 18, 2022
0.28.0  2.11.x  Nov 21, 2022
0.27.0  2.10.x  Sep 08, 2022
0.26.0  2.9.x   May 17, 2022
0.25.0  2.8.x   Apr 19, 2022
0.24.0  2.8.x   Feb 04, 2022
0.23.1  2.7.x   Dec 15, 2021
0.23.0  2.7.x   Dec 14, 2021
0.22.0  2.7.x   Nov 10, 2021
0.21.0  2.6.x   Sep 12, 2021
0.20.0  2.6.x   Aug 11, 2021
0.19.1  2.5.x   Jul 25, 2021
0.19.0  2.5.x   Jun 25, 2021
0.18.0  2.5.x   May 13, 2021
0.17.1  2.4.x   Apr 16, 2021
0.17.0  2.4.x   Dec 14, 2020
0.16.0  2.3.x   Oct 23, 2020
0.15.0  2.3.x   Aug 03, 2020
0.14.0  2.2.x   Jul 08, 2020
0.13.0  2.2.x   May 10, 2020
0.12.0  2.1.x   Feb 28, 2020
0.11.0  2.1.x   Jan 10, 2020
0.10.0  2.0.x   Dec 05, 2019
0.9.1   2.0.x   Nov 15, 2019
0.9.0   2.0.x   Oct 18, 2019
0.8.1   1.15.x  Nov 15, 2019
0.8.0   1.15.x  Oct 17, 2019
0.7.2   1.14.x  Nov 15, 2019
0.7.1   1.14.x  Oct 18, 2019
0.7.0   1.14.x  Jul 14, 2019
0.6.0   1.13.x  May 29, 2019
0.5.0   1.13.x  Apr 12, 2019
0.4.0   1.13.x  Mar 01, 2019
0.3.0   1.12.0  Feb 15, 2019
0.2.0   1.12.0  Jan 29, 2019
0.1.0   1.12.0  Dec 16, 2018
toyota Supra
  • 3,181
  • 4
  • 15
  • 19