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 import statsmodels.api as smapi
, I get the following list of error messages:
ImportError Traceback (most recent call last)
/home/joshuajoseph/Desktop/ANU PhD 2016 onwards/msagnfracs.py in <module>()
9 import matplotlib.cm as cm #colour maps for plotting
10 from operator import truediv #to divide lists
---> 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 <module>()
3 from . import tools
4 from .tools.tools import add_constant, categorical
----> 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 <module>()
----> 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 <module>()
50 cache_readonly,
51 cache_writable)
---> 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 <module>()
9 import statsmodels.base.wrapper as wrap
10 from statsmodels.tools.numdiff import approx_fprime
---> 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 <module>()
2 test = Tester().test
3
----> 4 from .formulatools import handle_formula_data
/home/joshuajoseph/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/statsmodels/formula/formulatools.py in <module>()
1 from statsmodels.compat.python import iterkeys
2 import statsmodels.tools.data as data_util
----> 3 from patsy import dmatrices, NAAction
4 import numpy as np
5
ImportError: No module named patsy
So it would appear patsy
isn't installed. But when I do pip install patsy
, I get the following:
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)
and checking in my site-packages
folder, I see this:
patsy-0.4.1-py2.7.egg
Which is what the above bit of code points to. But that's it. This alone clearly isn't helping me out with my statsmodels
problem, yet I can't do any more to install patsy
. If I try to upgrade it (pip install --upgrade patsy
), I get this:
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)
Can anyone help me figure out what's going on?