pymc-devs / pymc2

THIS IS THE **OLD** PYMC PROJECT (VERSION 2). PLEASE USE PYMC INSTEAD:
http://pymc-devs.github.com/pymc/
Other
879 stars 229 forks source link

pymc.gelman_rubin in python 3.4.3+ disappeared #63

Closed oschoudhury closed 6 years ago

oschoudhury commented 8 years ago

I have run two tests with pymc 2.3.6 in python 3.4.3 and python 3.5 where I can import pymc and use a number of functions but cannot run the function pymc.gelman_rubin. The error is

AttributeError: module 'pymc' has no attribute 'gelman_rubin' 

The weird thing is that not only is the function available in python 2.7, but I do see the function in the diagnostics.py file in the pymc directory in the python 3 location.

I did a quick check to see if more functions are missing. The complete list of functions missing according to the output of the command dir(pymc) ran in python 3.5 with respect to the output from running it in python 2.7 is as follows:

Matplot
__cached__
__loader__
__spec__
diagnostics
discrepancy
effective_n
gelman_rubin
geweke
iat
ppp_value
raftery_lewis
validate
fonnesbeck commented 8 years ago

I assume 2.4.6 is a typo? I cannot replicate this in Python 3.4.3 using PyMC 2.3.6 or the current master. Can you try re-installing? Also try installing from master, though that should be essentially identical to the release.

oschoudhury commented 8 years ago

Yes, it is 2.3.6, I've edited that in the post.

I tried it on another machine and there it worked without problems. So I checked if there are problems with any of the dependencies and there I found that the matplotlib-backend was missing (I got an ImportError saying that PySide is missing). I fixed that, and know I can use all of the above mentioned functions. So my guess is that in PyMC the ImportError is somehow not propagating through.