Same problem here, but below issues help me to fix this error.

  

      github.com/tensorflow/tensorflow
  

  
    
  
	  
  

  
    
      AlreadyExistsError: Another metric with the same name already exists 327
    

    
      
        opened 
        
          
        
        Aug 20, 2021
      
      

        
          closed 
        
          
        
        Aug 21, 2021
      
        

      
        
          
          takumatix
        
      
    

    
        stat:awaiting response
        type:support
        comp:ops
        2.6.0
    
  


  
    **System information**
- Have I written custom code (as opposed to using a stoc…k example script provided in TensorFlow): [I used this example](https://keras.io/examples/vision/conv_lstm/)
- OS Platform and Distribution: Windows 10 10.0.19043 Build 19043
- TensorFlow installed from (source or binary): Using pip
- TensorFlow version (use command below): 2.6.0
- Python version: 3.9.6
- CUDA/cuDNN version: V11.4.48
- GPU model and memory: NVIDIA GeForce RTX 3090, 24 GB

**Describe the current behavior**
I’ve updated Tensorflow and Keras to 2.6.0.

```
import numpy as np
import matplotlib.pyplot as plt

import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
```

I’ve faced the following issue.

```
---------------------------------------------------------------------------
AlreadyExistsError                        Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_16440/2264619257.py in <module>
      4 import tensorflow as tf
      5 from tensorflow import keras
----> 6 from tensorflow.keras import layers
      7 
      8 import io

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\keras\api\_v2\keras\__init__.py in <module>
      8 import sys as _sys
      9 
---> 10 from keras import __version__
     11 from keras.api._v2.keras import __internal__
     12 from keras.api._v2.keras import activations

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\keras\__init__.py in <module>
     23 
     24 # See b/110718070#comment18 for more details about this import.
---> 25 from keras import models
     26 
     27 from keras.engine.input_layer import Input

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\keras\models.py in <module>
     18 import tensorflow.compat.v2 as tf
     19 from keras import backend
---> 20 from keras import metrics as metrics_module
     21 from keras import optimizer_v1
     22 from keras.engine import functional

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\keras\metrics.py in <module>
     24 
     25 import numpy as np
---> 26 from keras import activations
     27 from keras import backend
     28 from keras.engine import base_layer

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\keras\activations.py in <module>
     18 
     19 from keras import backend
---> 20 from keras.layers import advanced_activations
     21 from keras.utils.generic_utils import deserialize_keras_object
     22 from keras.utils.generic_utils import serialize_keras_object

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\keras\layers\__init__.py in <module>
     21 
     22 # Generic layers.
---> 23 from keras.engine.input_layer import Input
     24 from keras.engine.input_layer import InputLayer
     25 from keras.engine.input_spec import InputSpec

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\keras\engine\input_layer.py in <module>
     19 from keras import backend
     20 from keras.distribute import distributed_training_utils
---> 21 from keras.engine import base_layer
     22 from keras.engine import keras_tensor
     23 from keras.engine import node as node_module

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\keras\engine\base_layer.py in <module>
     40 from keras.engine import node as node_module
     41 from keras.mixed_precision import autocast_variable
---> 42 from keras.mixed_precision import loss_scale_optimizer
     43 from keras.mixed_precision import policy
     44 from keras.saving.saved_model import layer_serialization

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\keras\mixed_precision\loss_scale_optimizer.py in <module>
     16 
     17 from keras import backend
---> 18 from keras import optimizers
     19 from keras.mixed_precision import loss_scale as keras_loss_scale_module
     20 from keras.optimizer_v2 import optimizer_v2

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\keras\optimizers.py in <module>
     24 from keras.optimizer_v1 import Optimizer
     25 from keras.optimizer_v1 import TFOptimizer
---> 26 from keras.optimizer_v2 import adadelta as adadelta_v2
     27 from keras.optimizer_v2 import adagrad as adagrad_v2
     28 from keras.optimizer_v2 import adam as adam_v2

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\keras\optimizer_v2\adadelta.py in <module>
     20 import numpy as np
     21 from keras import backend_config
---> 22 from keras.optimizer_v2 import optimizer_v2
     23 from tensorflow.python.util.tf_export import keras_export
     24 

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\keras\optimizer_v2\optimizer_v2.py in <module>
     34 
     35 
---> 36 keras_optimizers_gauge = tf.__internal__.monitoring.BoolGauge(
     37     "/tensorflow/api/keras/optimizers", "keras optimizer usage", "method")
     38 

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\tensorflow\python\eager\monitoring.py in __init__(self, name, description, *labels)
    358       *labels: The label list of the new metric.
    359     """
--> 360     super(BoolGauge, self).__init__('BoolGauge', _bool_gauge_methods,
    361                                     len(labels), name, description, *labels)
    362 

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\tensorflow\python\eager\monitoring.py in __init__(self, metric_name, metric_methods, label_length, *args)
    133           self._metric_name, len(self._metric_methods)))
    134 
--> 135     self._metric = self._metric_methods[self._label_length].create(*args)
    136 
    137   def __del__(self):

AlreadyExistsError: Another metric with the same name already exists.
```

**Describe the expected behavior**

No error should appear
  

  

  
    
    
  

  


  

      github.com/tensorflow/tensorflow
  

  
    
  
	  
  

  
    
      TensorFlow 2.6 installs Keras 2.7 154
    

    
      
        opened 
        
          
        
        Nov 3, 2021
      
      


      
        
          
          guillaumekln
        
      
    

    
        stat:awaiting response
        type:build/install
        2.6.0
    
  


  
    **System information**
- OS Platform and Distribution: Ubuntu 18.04
- TensorFl…ow installed from: binary
- TensorFlow version: 2.6.1
- Python version: 3.6.9
- Installed using virtualenv? pip? conda?: virtualenv + pip

**Describe the problem**

TensorFlow 2.6 installs Keras 2.7, but it should install Keras 2.6 instead.

**Provide the exact sequence of commands / steps that you executed before running into the problem**

```bash
pip install tensorflow==2.6.*
```

**Any other info / logs**

See `keras-2.7.0` in the list of installed packages:

> `Successfully installed absl-py-0.15.0 astunparse-1.6.3 cached-property-1.5.2 cachetools-4.2.4 certifi-2021.10.8 charset-normalizer-2.0.7 clang-5.0 dataclasses-0.8 flatbuffers-1.12 gast-0.4.0 google-auth-2.3.3 google-auth-oauthlib-0.4.6 google-pasta-0.2.0 grpcio-1.41.1 h5py-3.1.0 idna-3.3 importlib-metadata-4.8.1 keras-2.7.0 keras-preprocessing-1.1.2 markdown-3.3.4 numpy-1.19.5 oauthlib-3.1.1 opt-einsum-3.3.0 protobuf-3.19.1 pyasn1-0.4.8 pyasn1-modules-0.2.8 requests-2.26.0 requests-oauthlib-1.3.0 rsa-4.7.2 six-1.15.0 tensorboard-2.7.0 tensorboard-data-server-0.6.1 tensorboard-plugin-wit-1.8.0 tensorflow-2.6.1 tensorflow-estimator-2.6.0 termcolor-1.1.0 typing-extensions-3.7.4.3 urllib3-1.26.7 werkzeug-2.0.2 wrapt-1.12.1 zipp-3.6.0`