'TensorFlow installed with PDM not detecting GPU with M1 MacBook

I tried to install dependencies with PDM for a project and found the inconvenience that TensorFlow does not detect the GPU of the M1. When I create a virtual environment with poetry I do not have the same problem.

Does anyone know why this may happen?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source