Warning: Installing Arviz breaks pymc3, install with --no-dependencies

This is partly a warning to others, since I’m pretty sure this is what happened.
I had a functioning installation of pymc3, everything worked as expected. When I installed Arviz, it automatically uninstalled numpy and reinstalled an older version since it requires 1.15. Next time I imported pymc3 I got the following error:

WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.

And it’s pretty annoying to sort everything once you get that error, as described here.

I uninstalled theano pymc3 and numpy, reinstalled them, and still got the error. Ended up just removing my whole virtual environment and starting over. This is why I always run pymc3 in a virtual env or preferably, a docker.

I’ve posted a report on the arviz github as well. Since I think their goal is to be compatible with packages like pymc3. So hopefully this is a short-lived issue

To install arviz without breaking your pymc3 installation, do the following:

pip install arviz --no-dependencies
pip install netCDF4
pip install xarray

Those are the only dependencies I needed when starting with anaconda. This forces it not to upgrade or downgrade your numpy, which is what I think breaks the installation. Can’t guarantee that arviz will work properly if your numpy is older, though. For me it downgraded. Though I also don’t yet if the upgraded version will cause problems.

EDIT: Devs at Arviz have already replied to the issue. The numpy version pin was a short term fix that wasn’t supposed to make it into production. There should be an update in the next few days resolving the issue. And the update will introduce new features, so that’s exciting! In the meantime, install from master rather than directly from pip.
Follow along here.

4 Likes

To follow up on this, ArviZ 0.3.3 has been released which fixes this issue. Everything should pip install with no problems

Thanks for the inbetween solution @lwahedi!

2 Likes

Sorry for the delay, was traveling. Just tried it and it’s all resolved! Thanks!