What package does the 1.27.0 refer to? Do you mean PyTensor 2.17.0: Release rel-2.17.0 · pymc-devs/pytensor · GitHub?
PyMC always pins a specific version of PyTensor, and this shouldn’t be changed manually. In this case PyMC is not yet compatible with 2.17.0, because we changed how the GammaRV works internally.