Why can't I import tensorflow_ The datasets module?

Traceback (most recent call last):
File “C:\Users\65205\AppData\Local\Programs\Python\Python39\lib\site-packages\IPython\core\interactiveshell.py”, line 3508, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File “”, line 1, in
import tensorflow_datasets
File “D:\Program Files\JetBrains\PyCharm 2022.3.3\plugins\python\helpers\pydev_pydev_bundle\pydev_import_hook.py”, line 21, in do_import
module = self.system_import(name, *args, **kwargs)
File "C:\Users\65205\AppData\Roaming\Python\Python39\site-packages\tensorflow_datasets_init
.py", line 43, in
import tensorflow_datasets.core.logging as _tfds_logging
File “D:\Program Files\JetBrains\PyCharm 2022.3.3\plugins\python\helpers\pydev_pydev_bundle\pydev_import_hook.py”, line 21, in do_import
module = self.system_import(name, *args, **kwargs)
File "C:\Users\65205\AppData\Roaming\Python\Python39\site-packages\tensorflow_datasets\core_init
.py", line 22, in
from tensorflow_datasets.core import community
File “D:\Program Files\JetBrains\PyCharm 2022.3.3\plugins\python\helpers\pydev_pydev_bundle\pydev_import_hook.py”, line 21, in do_import
module = self.system_import(name, *args, **kwargs)
File "C:\Users\65205\AppData\Roaming\Python\Python39\site-packages\tensorflow_datasets\core\community_init
.py", line 18, in
from tensorflow_datasets.core.community.huggingface_wrapper import mock_builtin_to_use_gfile
File “D:\Program Files\JetBrains\PyCharm 2022.3.3\plugins\python\helpers\pydev_pydev_bundle\pydev_import_hook.py”, line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File “C:\Users\65205\AppData\Roaming\Python\Python39\site-packages\tensorflow_datasets\core\community\huggingface_wrapper.py”, line 31, in
from tensorflow_datasets.core import dataset_builder
File “D:\Program Files\JetBrains\PyCharm 2022.3.3\plugins\python\helpers\pydev_pydev_bundle\pydev_import_hook.py”, line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File “C:\Users\65205\AppData\Roaming\Python\Python39\site-packages\tensorflow_datasets\core\dataset_builder.py”, line 44, in
from tensorflow_datasets.core import split_builder as split_builder_lib
File “D:\Program Files\JetBrains\PyCharm 2022.3.3\plugins\python\helpers\pydev_pydev_bundle\pydev_import_hook.py”, line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File “C:\Users\65205\AppData\Roaming\Python\Python39\site-packages\tensorflow_datasets\core\split_builder.py”, line 37, in
from tensorflow_datasets.core import writer as writer_lib
File “D:\Program Files\JetBrains\PyCharm 2022.3.3\plugins\python\helpers\pydev_pydev_bundle\pydev_import_hook.py”, line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File “C:\Users\65205\AppData\Roaming\Python\Python39\site-packages\tensorflow_datasets\core\writer.py”, line 33, in
from tensorflow_datasets.core import shuffle
File “D:\Program Files\JetBrains\PyCharm 2022.3.3\plugins\python\helpers\pydev_pydev_bundle\pydev_import_hook.py”, line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File “C:\Users\65205\AppData\Roaming\Python\Python39\site-packages\tensorflow_datasets\core\shuffle.py”, line 20, in
import resource
File “D:\Program Files\JetBrains\PyCharm 2022.3.3\plugins\python\helpers\pydev_pydev_bundle\pydev_import_hook.py”, line 21, in do_import
module = self._system_import(name, *args, **kwargs)
ModuleNotFoundError: No module named ‘resource’

Hi @noob, I am able to import tensorflow_datasets in colab without any error.

image

Could you please try to install tensorflow_datasets 4.9.4. Thank You.