PyMC uses PyTensor now not theano. Replace import theano.tensor with import pytensor.tensor
import theano.tensor
import pytensor.tensor