I am studying the book Bayessian analysis with python and trying to implement all codes in python, for this purpose I use google colab, but when I am running following code from book
import arviz
import pymc3 as pm
import numpy as np
from scipy import stats
np.random.seed(123)
n_experiments=4
theta_real =0.35
data =stats.bernoulli.rvs(p=theta_real,size=n_experiments)
with pm.Model() as our_first_model:
theta =pm.Beta('theta',alpha=1,beta=1)
y =pm.Bernoulli('y',p=theta,observed=data)
start =pm.find_MAP()
step =pm.Metropolis()
trace =pm.sample(1000,step=step,start=start)
burnin=100
chain =trace[burnin:]
pm.traceplot(chain,lines={'theta':theta_real})
it gives such errors :
AttributeError: Installed version of ArviZ requires PyMC3>=3.8. Please upgrade with `pip install pymc3>=3.8` or `conda install -c conda-forge pymc3>=3.8`
before I tried to implement those libraries
!pip install pymc3>=3.8
!pip install arviz
but still no success. How do I fix this error?