Transformers can't detect tensorflow installed in some different path of the environment, even though the path is added to PYTHONPATH
Transformers is not able to detect tensorflow installed in different directory. 

Steps to reproduce, execute the commands in order:

`docker pull unifyai/ivy:latest`
`docker run --rm -it unifyai/ivy:latest`
 `pip install transformers`
`python`
`from transformers import TFDeiTModel`
`model = TFDeiTModel.from_pretrained("facebook/deit-base-distilled-patch16-224")`

 
Hi @RickSanchezStoic, thanks for raising this issue! 

It seems this is a bug relating to how we detect TF being in the environment, @Rocketknight1 is opening a PR to resolve. Related issue here: #24253<|||||>Hi @RickSanchezStoic, can you confirm what you mean by "installed in a different directory" here? Do you mean that it's not installed as a library, but instead just present as a local directory in the directory you're running your code in?<|||||>@RickSanchezStoic we just merged PR #24255 based on this issue and #24253. However, it might not actually resolve your problem - can you test if the new version fixes your issue? You can install the latest version from main with `pip install --upgrade git+https://github.com/huggingface/transformers.git`<|||||>> Hi @RickSanchezStoic, can you confirm what you mean by "installed in a different directory" here? Do you mean that it's not installed as a library, but instead just present as a local directory in the directory you're running your code in?

It means when the package is installed elsewhere when you use the `--target` flag  with pip to specify a different location.<|||||>> @RickSanchezStoic we just merged PR #24255 based on this issue and #24253. However, it might not actually resolve your problem - can you test if the new version fixes your issue? You can install the latest version from main with `pip install --upgrade git+https://github.com/huggingface/transformers.git`

Sure! will check this out and report here. Thanks!<|||||>> @RickSanchezStoic we just merged PR #24255 based on this issue and #24253. However, it might not actually resolve your problem - can you test if the new version fixes your issue? You can install the latest version from main with `pip install --upgrade git+https://github.com/huggingface/transformers.git`

This worked. This is what we needed. Thanks a lot!