I want to plot using pm.traceplot(mcmc_trace,[‘theta’]) in Google Colab but getting error:
ImportError: ArviZ is not installed. In order to use
pip install arviz
NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt.
Whereas I have already installed Arviz and and import arviz which works but not able to plot.
in Google colab, you need to do run the follow in one of the cell:
!pip install arviz
I had the same problem, did what @junpenglao suggests, but that did not solve the problem.
In the end I installed the following versions of pymc3, theano and arviz to to get a working environment.
So in each Colab notebook I start with
!pip install arviz==0.6.1
!pip install pymc3==3.8
!pip install Theano==1.0.4
Bit of a pain to have to redo the install on each notebook run though.
That’s odd @alexisperrier ! what @junpenglao suggested does work for me without playing around with
Theano versions in colab. OTOH, installing libraries every time in colab is a little pain but this SO thread really helped me.
wow this is a great trick, thanks for sharing!
@Fahad_hameed Maybe you just forgot to restart your runtime after installing
arviz. Remember that whenever you install a new library, you need to restart the runtime as colab will not load installed libaries in the session in which it was installed.
Had the same issue 4/7/2021. Installing these versions fixed the issue. Thanks!