My Environment:
Python 3.11.2, Tensorflow 2.12.0-rc1, Tensorflow-datasets 4.8.3, perfect clean newly created virtual environment in Visual Studio Code with the only operations performed being pip install the two libraries above .
The import statements :
import tensorflow as tf
import tensorflow_datasets as tfds
runs quickly without bugs. However, the next line:
dataset, info = tfds.load('plant_village', split='train', with_info=True)
yields the error:
Attempts made to access other datasets, like mnist, are successful. Is this a bug specific to this data set? How do I overcome this bug and load this dataset? Note that exactly the same lines of code work perfectly on google colab .
2
Answers
As per the tested build configuration, you should install the stable tensorflow with the given compatible python version in your system to avoid unexpected errors.
TensorFlow 2.11
andpython 3.10
are the latest stable compatible versions.There is no tensorflow version available compatible with the
python 3.11
version as of now.Let us know if the issue still persists. Thank you!
As @TFer2 mentioned, Google Colab currently uses Tensorflow 2.11.0, Tensorflow Datasets 4.8.3 and Python 3.9.16 at the time of writing this comment. You should verify the version number of these libraries in the Colab you were using and create a new environment to match these versions.