EN ·
🌏 中文

Fixing TensorFlow I/O Compatibility Errors

While experimenting with a new approach in a Kaggle IPython Notebook, I encountered an error when executing import tensorflow_io. The code was as follows:

import tensorflow_io 

The system returned an error, with the core message being:

libtensorflow_io.so undefined symbol:
_ZN10tensorflow0pKernel11TraceStringEPNS_150pKernelContextEb'

Since I wasn’t very familiar with tensorflow-io, I turned to Google. While there were several results (such as this Stack Overflow thread), many of the suggestions were generic, such as uninstalling and reinstalling tensorflow-gpu and tensorflow-io, which didn’t address the root cause.

Why does this happen?

The error occurs because tensorflow-io and tensorflow must be strictly compatible. The official tensorflow-io GitHub repository maintains a version compatibility table.

After checking the table, I found that the default TensorFlow version in the Kaggle environment was 2.12, but the installed tensorflow-io version was 0.31.0. According to the compatibility matrix, I needed tensorflow-io version 0.32.0. By running the following command in the notebook, the issue was resolved:

!pip install tensorflow-io==0.32.0

The error disappeared immediately. It appears that even pre-configured environments can occasionally have dependency mismatches.

For reference, here is the compatibility table: tensorflow-version-compatibility

TensorFlow I/O VersionTensorFlow CompatibilityRelease Date
0.32.02.12.xMar 28, 2023
0.31.02.11.xFeb 25, 2023
0.30.02.11.xJan 20, 2023
0.29.02.11.xDec 18, 2022
0.28.02.11.xNov 21, 2022
0.27.02.10.xSep 08, 2022
0.26.02.9.xMay 17, 2022
0.25.02.8.xApr 19, 2022
0.24.02.8.xFeb 04, 2022
0.23.12.7.xDec 15, 2021
0.23.02.7.xDec 14, 2021
0.22.02.7.xNov 10, 2021
0.21.02.6.xSep 12, 2021
0.20.02.6.xAug 11, 2021
0.19.12.5.xJul 25, 2021
0.19.02.5.xJun 25, 2021
0.18.02.5.xMay 13, 2021
0.17.12.4.xApr 16, 2021
0.17.02.4.xDec 14, 2020
0.16.02.3.xOct 23, 2020
0.15.02.3.xAug 03, 2020
0.14.02.2.xJul 08, 2020
0.13.02.2.xMay 10, 2020
0.12.02.1.xFeb 28, 2020
0.11.02.1.xJan 10, 2020
0.10.02.0.xDec 05, 2019
0.9.12.0.xNov 15, 2019
0.9.02.0.xOct 18, 2019
0.8.11.15.xNov 15, 2019
0.8.01.15.xOct 17, 2019
0.7.21.14.xNov 15, 2019
0.7.11.14.xOct 18, 2019
0.7.01.14.xJul 14, 2019
0.6.01.13.xMay 29, 2019
0.5.01.13.xApr 12, 2019
0.4.01.13.xMar 01, 2019
0.3.01.12.0Feb 15, 2019
0.2.01.12.0Jan 29, 2019
0.1.01.12.0Dec 16, 2018