Hi,
I’ve been using PyMC3 3.9.3 for a while. But very recently (within a week) I am not able to import the package because of below error. Is it a bug?
Thanks,
Yurong
Update:
Downgrading xarray to an earlier version (0.15.1) fixed the error. So it seems the latest xarray version (0.16.1) installed automatically when installing pymc3==3.9.3 is not compatible.
import pymc3
Traceback (most recent call last):
File “”, line 1, in
File “/home/ubuntu/.local/lib/python3.6/site-packages/pymc3/init.py”, line 41, in
from .distributions import *
File “/home/ubuntu/.local/lib/python3.6/site-packages/pymc3/distributions/init.py”, line 15, in
from . import timeseries
File “/home/ubuntu/.local/lib/python3.6/site-packages/pymc3/distributions/timeseries.py”, line 22, in
from pymc3.util import get_variable_name
File “/home/ubuntu/.local/lib/python3.6/site-packages/pymc3/util.py”, line 20, in
import arviz
File “/home/ubuntu/.local/lib/python3.6/site-packages/arviz/init.py”, line 28, in
from .data import *
File “/home/ubuntu/.local/lib/python3.6/site-packages/arviz/data/init.py”, line 2, in
from .inference_data import InferenceData, concat
File “/home/ubuntu/.local/lib/python3.6/site-packages/arviz/data/inference_data.py”, line 15, in
from …utils import _subset_list, HtmlTemplate
File “/home/ubuntu/.local/lib/python3.6/site-packages/arviz/utils.py”, line 670, in
class HtmlTemplate:
File “/home/ubuntu/.local/lib/python3.6/site-packages/arviz/utils.py”, line 696, in HtmlTemplate
css_template = f" {xr.core.formatting_html.CSS_STYLE}{specific_style} "
AttributeError: module ‘xarray.core.formatting_html’ has no attribute ‘CSS_STYLE’