title: Rodeo: ImportError: No module named 'statsmodels'
body: <p>I just start to use <code>Rodeo</code> with <code>Python 3.6.2</code>. But there is an error when importing <code>statsmodels</code> under Windows 10. Here is the script:</p>
  
  <pre><code>import pandas as pd
  import statsmodels.api as sm
  import pylab as pl
  import numpy as np
  </code></pre>
  
  <p>When highlight <code>import statsmodels.api as sm</code> and click <code>Run line</code>, there is an error:</p>
  
  <pre><code>&gt;&gt;&gt; import statsmodels.api as sm
  ImportError: No module named 'statsmodels'
  ---------------------------------------------------------------------------
  ImportError                               Traceback (most recent call last)
  &lt;ipython-input-3-6030a6549dc0&gt; in &lt;module&gt;()
  ----&gt; 1 import statsmodels.api as sm
  ImportError: No module named 'statsmodels'
  </code></pre>
  
  <p>Then I downloaded the <code>statsmodels</code> from <code>Github</code> and installed it. Here is the output of <code>pip list</code>:</p>
  
  <pre><code>C:\Users\Documents\statsmodels-master\statsmodels-master&gt;pip list
  DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
  Cython (0.26)
  numpy (1.13.1)
  pandas (0.20.3)
  patsy (0.4.1)
  pip (9.0.1)
  python-dateutil (2.6.1)
  pytz (2017.2)
  scipy (0.19.1)
  setuptools (28.8.0)
  six (1.10.0)
  statsmodels (0.8.0)
  </code></pre>
  
  <p>The output shows that <code>statsmodels 0.8.0</code> is installed. But there is still importing error. It seems that the <code>Rodeo</code> has difficulty to see <code>statsmodels</code>.</p>
  
  <p>UPDATE:</p>
  
  <p>Here is the output of <code>print(sys.pth)</code> in <code>Rodeo</code>. There is a path for the <code>statsmodels</code>.</p>
  
  <pre><code>&gt;&gt;&gt; print(sys.path)
  ['', 'C:\\Python36\\Scripts', 'c:\\python36\\lib\\site-packages\\statsmodels-0.8.0-py3.6-win-amd64.egg', 'C:\\Python36', 'C:\\Python36\\python36.zip', 'C:\\Python36\\DLLs', 'C:\\Python36\\lib', 'C:\\Python36\\lib\\site-packages', 'C:\\Python36\\lib\\site-packages\\patsy-0.4.1-py3.6.egg', 'C:\\Python36\\lib\\site-packages\\pandas-0.20.3-py3.6-win-amd64.egg', 'C:\\Python36\\lib\\site-packages\\six-1.10.0-py3.6.egg', 'C:\\Python36\\lib\\site-packages\\pytz-2017.2-py3.6.egg', 'C:\\Python36\\lib\\site-packages\\python_dateutil-2.6.1-py3.6.egg', 'C:\\Python36\\lib\\site-packages\\IPython\\extensions', 'C:\\Users\\JunC\\.ipython']
  </code></pre>