I am following the guide for installing TensorFlow Slim, and I faced this error.
ImportError: cannot import name 'GceClusterResolver'
I searched online and found some questions on Stack Overflow regarding "import error cannot import name xxx", but none of them is the same as mine. I've tried their solutions too but they didn't work.
This is the complete error message. Any help is greatly appreciated.
python -c "import tensorflow.contrib.slim as slim; eval = slim.evaluation.evaluate_once"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/__init__.py", line 31, in <module>
from tensorflow.contrib import cluster_resolver
File "/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/cluster_resolver/__init__.py", line 26, in <module>
from tensorflow.python.distribute.cluster_resolver.gce_cluster_resolver import GceClusterResolver
ImportError: cannot import name 'GceClusterResolver'
I found out that i was using
tflearnwithtensorflow 2but tflearn is not compatible with tensorflow 2. I just falled back to a tensorflow 1 version.