Hamid Ebrahimi
Hamid Ebrahimi

Reputation: 41

Cant to install tensorflow_federated

I try to install tensorflow federated.

pip install --quiet --upgrade tensorflow_federated_nightly

but when I want to import tensorflow federated, I get this warning and after that google colab notebook is restarted.

WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.tracking.base has been moved to tensorflow.python.trackable.base. The old module will be deleted in version 2.11.
WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.checkpoint_management has been moved to tensorflow.python.checkpoint.checkpoint_management. The old module will be deleted in version 2.9.
WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.tracking.resource has been moved to tensorflow.python.trackable.resource. The old module will be deleted in version 2.11.
WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.tracking.util has been moved to tensorflow.python.checkpoint.checkpoint. The old module will be deleted in version 2.11.
WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.tracking.base_delegate has been moved to tensorflow.python.trackable.base_delegate. The old module will be deleted in version 2.11.
WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.tracking.graph_view has been moved to tensorflow.python.checkpoint.graph_view. The old module will be deleted in version 2.11.

Also, I try install tensorflow federated as this way:

pip install --quiet --upgrade tensorflow_federated

but get error when import tensorflow federated

TypeError: 'type' object is not subscriptable

how do I fix it?

Upvotes: 2

Views: 2153

Answers (1)

user8421958
user8421958

Reputation: 15

It's a compatibility issue , I faced this same error message while working with Google Colab, just installed tensorflow-federated==0.20.0 as a quick fix as described in this issue on github: https://github.com/tensorflow/federated/issues/2748#issuecomment-1107437271

Upvotes: 1

Related Questions