问题描述:
import tensorflow_datasets 时报错:
Traceback (most recent call last):
File “transfer_learning_resnet101.py”, line 25, in
import tensorflow_datasets as tfds
File “/home/zzh/data/dev/virtualenv/py3env/lib/python3.5/site-packages/tensorflow_datasets/init.py”, line 46, in
from tensorflow_datasets.core import tf_compat
File “/home/zzh/data/dev/virtualenv/py3env/lib/python3.5/site-packages/tensorflow_datasets/core/init.py”, line 25, in
from tensorflow_datasets.core.dataset_builder import BeamBasedBuilder
File “/home/zzh/data/dev/virtualenv/py3env/lib/python3.5/site-packages/tensorflow_datasets/core/dataset_builder.py”, line 34, in
from tensorflow_datasets.core import dataset_utils
File “/home/zzh/data/dev/virtualenv/py3env/lib/python3.5/site-packages/tensorflow_datasets/core/dataset_utils.py”, line 29, in
from tensorflow_datasets.core import utils
File “/home/zzh/data/dev/virtualenv/py3env/lib/python3.5/site-packages/tensorflow_datasets/core/utils/init.py”, line 22, in
from tensorflow_datasets.core.utils.tqdm_utils import *
File “/home/zzh/data/dev/virtualenv/py3env/lib/python3.5/site-packages/tensorflow_datasets/core/utils/tqdm_utils.py”, line 25, in
from tqdm import auto as tqdm_lib
ImportError: cannot import name 'auto’
原因:tqdm版本问题
升级tqdm到4.32.0版本后,tensorflow_datasets 加载成功
pip install tqdm==4.32.0