# calculating or approximating the normalizing constant bayesian posterior

I am wondering if it is possible to re-calculate the normalizing constant of the posterior distribution for example the following

$$\pi(\theta|\boldsymbol{Y}) = \frac{L(\boldsymbol{Y}|\theta)\pi(\theta)}{\int L(\boldsymbol{Y}|\theta)\pi(\theta)d\theta}$$

often in the models I deal with the normalizing constant has no closed form so we by pass it as we are interested in the posterior of $\theta$ via the usual proportionality

$$\pi(\theta|\boldsymbol{Y}) \propto L(\boldsymbol{Y}|\theta)\pi(\theta)$$

My question is for Bayes factors and model averaging we require the normalizing constant. Is it possible to back calculate or approximate ${\int L(\boldsymbol{Y}|\theta)\pi(\theta)d\theta}$ given the proportional posterior?