16

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?

8 Answers 8

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

3
  • 2
    This resolved the issue for me Commented Dec 17, 2021 at 20:02
  • Solves the issue on Google Colab, too. Nice. Thanks!
    – 89f3a1c
    Commented May 21, 2022 at 19:01
  • 3
    Why does this work? Commented Aug 20, 2022 at 10:32
3

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.

2
  • This was very useful - I was trying TF 2.13 but there isn't a TF IO version for that yet.
    – grofte
    Commented Jul 31, 2023 at 9:19
  • I am getting ERROR: Ignored the following versions that require a different python version: 0.28.0 Requires-Python >=3.7, <3.11 ERROR: Could not find a version that satisfies the requirement tensorflow-io==0.13.0 (from versions: 0.29.0, 0.30.0, 0.31.0, 0.32.0, 0.33.0, 0.34.0) ERROR: No matching distribution found for tensorflow-io==0.13.0 Commented Nov 6, 2023 at 14:37
2

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
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 
0
1

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
1
  • I still have the same problem, even if I check the compatibility of ternsorflow and ternsorflow.io. I have these versions: python==3.10 tensorflow==2.16.1 tensorflow.io==0.37.0 Based on [this compatibility table][pypi.org/project/tensorflow-io/], I expected to have a runnable code. Does anyone have any suggestion? Commented Jul 14 at 18:07
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.

0

Solution:

!pip install tensorflow_io==0.17.1

!pip install tensorflow==2.4.0

0
0

This was a compatibility issue in my case, Check this thread: libtensorflow_io.so not found when running tensorflow-io on Windows 11 with Python 3.11

" There is python version conflicts. Tensorflow-io latest version 0.32.0 requires python >=3.7 and <3.11.

Please try again by downgrading the python version to 3.10 and install tensorflow 2.11 as mentioned in this TensorFlow Version Compatibility for installing tensorflow-io.

Please check this below screenshot for your reference"

1
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Apr 2 at 5:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.