Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot import pymc3 module due to geweke

Tags:

python

pymc3

I've tried installing it on a separate env and installing arviz separately. The import pymc3 as pm will not work.

AttributeError: module 'arviz' has no attribute 'geweke'
like image 687
user15810398 Avatar asked Oct 20 '25 00:10

user15810398


2 Answers

It looks like the issue is related to the version of python (3.6) you are using and a dependant library pyMC use called arviz.

Make sure you uninstall the old version and follow the following steps to reinstall everything.

Uninstall using :

  • pip uninstall Theano Theano-PyMC PyMC3

Make sure you remove theano left overs by running :

sudo rm -fr the_python_path_u_are_using/lib/python3.6/site-packages/theano

And then install arviz with :

  • pip install arviz==0.10.0

And finally, install pymc3 again.

pip install pymc3

Try again and it will work.

like image 55
Espoir Murhabazi Avatar answered Oct 22 '25 16:10

Espoir Murhabazi


It depends on your environment

For Anaconda: Uninstall “arviz” Use: conda uninstall arviz

Now, install the latest version of “arviz” For today, it is version 0.11.1 Use:

conda install arviz==0.11.1

For Non Anaconda environments: Uninstall “arviz” Use: pip uninstall arviz Now, install the latest version of “arviz” Use:

pip install arviz==0.11.1
like image 35
Ngozi Emeh Avatar answered Oct 22 '25 16:10

Ngozi Emeh