title: Python - Patsy apparently installed but python can't find it?
body: <p>So my installation for statsmodels has been very messy - I've actually had to move the folder into Enthought's site-packages folder myself. But anyway now, when I choose to <code>import statsmodels.api as smapi</code>, I get the following list of error messages:</p>
  
  <pre><code>ImportError                               Traceback (most recent call last)
  /home/joshuajoseph/Desktop/ANU PhD 2016 onwards/msagnfracs.py in &lt;module&gt;()
        9 import matplotlib.cm as cm #colour maps for plotting
       10 from operator import truediv #to divide lists
  ---&gt; 11 import statsmodels.api as smapi
       12 import statsmodels.graphics as smgraphics
       13 
  
  /home/joshuajoseph/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/statsmodels/api.py in &lt;module&gt;()
        3 from . import tools
        4 from .tools.tools import add_constant, categorical
  ----&gt; 5 from . import regression
        6 from .regression.linear_model import OLS, GLS, WLS, GLSAR
        7 from .regression.quantile_regression import QuantReg
  
  /home/joshuajoseph/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/statsmodels/regression/__init__.py in &lt;module&gt;()
  ----&gt; 1 from .linear_model import yule_walker
        2 
        3 from statsmodels import NoseWrapper as Tester
        4 test = Tester().test
  
  /home/joshuajoseph/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/statsmodels/regression/linear_model.py in &lt;module&gt;()
       50                                           cache_readonly,
       51                                           cache_writable)
  ---&gt; 52 import statsmodels.base.model as base
       53 import statsmodels.base.wrapper as wrap
       54 from statsmodels.emplike.elregress import _ELRegOpts
  
  /home/joshuajoseph/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/statsmodels/base/model.py in &lt;module&gt;()
        9 import statsmodels.base.wrapper as wrap
       10 from statsmodels.tools.numdiff import approx_fprime
  ---&gt; 11 from statsmodels.formula import handle_formula_data
       12 from statsmodels.compat.numpy import np_matrix_rank
       13 from statsmodels.base.optimizer import Optimizer
  
  /home/joshuajoseph/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/statsmodels/formula/__init__.py in &lt;module&gt;()
        2 test = Tester().test
        3 
  ----&gt; 4 from .formulatools import handle_formula_data
  
  /home/joshuajoseph/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/statsmodels/formula/formulatools.py in &lt;module&gt;()
        1 from statsmodels.compat.python import iterkeys
        2 import statsmodels.tools.data as data_util
  ----&gt; 3 from patsy import dmatrices, NAAction
        4 import numpy as np
        5 
  
  ImportError: No module named patsy 
  </code></pre>
  
  <p>So it would appear <code>patsy</code> isn't installed. But when I do <code>pip install patsy</code>, I get the following:</p>
  
  <p><code>Requirement already satisfied (use --upgrade to upgrade): patsy in ./Enthought/Canopy_64bit/User/lib/python2.7/site-packages/patsy-0.4.1-py2.7.egg
  Requirement already satisfied (use --upgrade to upgrade): six in ./Enthought/Canopy_64bit/User/lib/python2.7/site-packages (from patsy)
  Requirement already satisfied (use --upgrade to upgrade): numpy in ./Enthought/Canopy_64bit/User/lib/python2.7/site-packages (from patsy)</code></p>
  
  <p>and checking in my <code>site-packages</code> folder, I see this:</p>
  
  <p><code>patsy-0.4.1-py2.7.egg</code></p>
  
  <p>Which is what the above bit of code points to. But that's it. This alone clearly isn't helping me out with my <code>statsmodels</code> problem, yet I can't do any more to install <code>patsy</code>. If I try to upgrade it (<code>pip install --upgrade patsy</code>), I get this:</p>
  
  <p><code>Requirement already up-to-date: patsy in ./patsy-0.4.1-py2.7.egg
  Requirement already up-to-date: six in /home/joshuajoseph/Enthought/Canopy_64bit/User/lib/python2.7/site-packages (from patsy)
  Requirement already up-to-date: numpy in /home/joshuajoseph/Enthought/Canopy_64bit/User/lib/python2.7/site-packages (from patsy)</code></p>
  
  <p>Can anyone help me figure out what's going on?</p>