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 Version | TensorFlow Compatibility | Release Date |
|---|---|---|
| 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 |