Transformer for TF 1.15.0?

I have to use TF 1.15 in my project, but it seems that Transformer have to be used with >=TF2.0. Is that right? I got this error for a testing:

from sklearn.metrics.pairwise import cosine_similarity
import tensorflow as tf
from transformers import BertTokenizer, TFBertModel

tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
model = TFBertModel.from_pretrained('bert-base-uncased')
input_ids = tf.constant(tokenizer.encode("Hello, my dog is cute"))[None, :]  
outputs = model(input_ids)
last_hidden_states = outputs[0]

And the error message is below:

Traceback (most recent call last):
  File "/Users/nlu/tests/", line 67, in <module>
    model = TFBertModel.from_pretrained('bert-base-uncased')
  File "/Users/bm/venv/bm/lib/python3.7/site-packages/transformers/utils/", line 542, in from_pretrained
    requires_backends(cls, ["tf"])
  File "/Users/bm/venv/bm/lib/python3.7/site-packages/transformers/", line 822, in requires_backends
    raise ImportError("".join([BACKENDS_MAPPING[backend][1].format(name) for backend in backends]))
TFBertModel requires the TensorFlow library but it was not found in your environment. Checkout the instructions on the
installation page: and follow the ones that match your environment.

Is there a way to get transorformer with TF 1.15?

The minimal version of supported by Transformers is TensorFlow 2.3

Good to know. Thanks.