Python 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymc3 as pm
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/hartlc/anaconda3/envs/pymc3/lib/python3.8/site-packages/pymc3/__init__.py", line 13, in <module>
from .stats import *
File "/home/hartlc/anaconda3/envs/pymc3/lib/python3.8/site-packages/pymc3/stats/__init__.py", line 32, in <module>
geweke = map_args(az.geweke)
AttributeError: module 'arviz' has no attribute 'geweke'
Hi, new to the forum. I had quite a bit of trouble installing PyMC3 on my machine yesterday and today. I am using conda 4.10.1 on a mac (10.15.7).
I followed the install instructions:
conda install -c conda-forge pymc3
just importing the library gave me an error, then I did what AllenDowney suggested and I can confirm that worked! (thanks so much!).
I know it is not possible to test against every base OS, but is it perhaps possible to at least publish the versions that work with a specific conda release? My (limited) understanding is that arviz is bound to a specific version of pymc3. Is that published somewhere?
On a second note at the homepage there is this function:
X, y = linear_training_data()
when you copy and paste it just to see if you have a working install, it bombs. Perhaps we could put a very small test dataset in the install so a function like this works out of the box?
Thanks so much for this thread everyone! I know I could not have gotten this installed without the ideas here! thanks so much!
This has nothing to do with the conda version. It is related to the python version. The latest pymc3, numpy, pandas, matplotlib, scipy… no longer support python 3.6 whereas latest ArviZ does (for now, we haven’t yet gotten to the drop py3.6 release but it should happen in the next release), and latest ArviZ is compatible with latest pymc3 which is what we test. The problem is that as the latest pymc3 doesn’t support python 3.6, the default installation for python 3.6 is an old pymc3 with the latest arviz which doesn’t work.
This is why my first recommendation was to upgrade the python version in order to be able to use latest versions of both pymc3 and arviz. Only if this is not possible I would then downgrade arviz, because in keeping python 3.6 you are renouncing to all updates of the scientific python ecosystem.
Then there is also an issue with conda not wanting to install latest pymc3 even if using a python version that is compatible with it which I sincerely have no idea why it happens and it clearly should not but ends up having the same effect (but the root causes are completely unrelated afaik) as it seems from other answers in the thread that it has no problems installing latest arviz
The bound is not with specific versions but with ranges and we are continuously working to get these ranges to be wider every time. There is therefore no document that does exactly what you ask, but the requirements.txt in pymc3 is always updated to make sure it has a correct lower bound. Therefore, if you go to pymc3/requirements.txt at master · pymc-devs/pymc3 · GitHub and then select the PyMC3 version you are interested in from the branch dropdown (all versions are tagged and accessible from the “tag” tab) you’ll see something like:
arviz>=0.9.0 # taken from v3.10.0 tag
which means that 0.9.0 is an arviz version compatible with pymc3 3.10.0. Follow up versions will probably be compatible too (in this particular case, I think 0.11.0 is still compatible with 3.10) but there are no guarantees anymore. By the time arviz 0.10.0 is released, maybe pymc3 has already released 3.11.0 and 0.10.0 is therefore tested against it and is never tested against 3.10.0
This is a great idea, can you open an issue for that on github?