Error importing pymc3 with theano scalar i1, i0

I have installed pymc3 in windows 10 using anaconda (with python 2.7) using this command:

conda install -c conda-forge pymc3

Initially, I had this theano issue which was solved installing libpython:

conda install -c anaconda libpython=2.0

Now importing theano seems to work. However, I still get this error while importing pymc3:

File “C:/Users/user/PycharmProjects/tests/dependenciesTesting.py”, line 8, in
import pymc3
File “C:\ProgramData\Anaconda2\lib\site-packages\pymc3_init_.py”, line 5, in
from .distributions import *
File “C:\ProgramData\Anaconda2\lib\site-packages\pymc3\distributions_init_.py”, line 1, in
from . import timeseries
File “C:\ProgramData\Anaconda2\lib\site-packages\pymc3\distributions\timeseries.py”, line 5, in
from .continuous import get_tau_sd, Normal, Flat
File “C:\ProgramData\Anaconda2\lib\site-packages\pymc3\distributions\continuous.py”, line 14, in
from theano.scalar import i1, i0
ImportError: cannot import name i1

Thank you for any advice.

What version of theano are you using?

1 Like

The most like thing that is happening is that you installed an old theano version that did not have i0 or i1 implemented. Try updating theano to the latest version and tell us if that fixes your issue

1 Like

You are completely right: I had theano 0.9.0. It is working now with the 1.0.3 version :sweat_smile:

Thank you very much!!