0

I just downloaded Statsmodels 0.6.1 with easy_install -U statsmodels i.e. I choose to upgrade my existing statsmodels. I work with OS X/anaconda/spyder.

When running my imports, python still imports the old version of statsmodels.

import numpy as np
from scipy import stats
import pandas as pd
import matplotlib.pyplot as plt
import statsmodels.api as sm 
from statsmodels.graphics.api import qqplot
from pandas import Series, DataFrame, Panel
import data as data
from data import indexed_df, external_df
from sklearn.utils import check_arrays
# import arma_order as order_order
# from arma_order import arma_order_select_ic
from statsmodels.tsa.stattools import (adfuller, acf, pacf_ols, pacf_yw,
                                                pacf, grangercausalitytests,
                                                coint, acovf,
                                                arma_order_select_ic)

but is not importing arma_order_select_ic which is part of the new version of statsmodels.

do i need to remove the old version of statsmodels in my directories so that python uses the new one?

i tried, but then some of my calculations changed their outputs, especially the selection process of ARMA parameters.

i also tried to copy the stattools.py in my directory, but then imports for stattools.py cant be done as they are in the new statsmodels folder, which cant be imported.

So i would like to run both statsmodels versions in one code! is that possible?

Or, can i put an alias/link of the whole new statsmodels folder into an other directory which and call it from there (i tried, but it wont work)

i know that this sounds confusing, but it is.

hope someone is nice and helps a newby.

cheers

Peter Knutsen
  • 667
  • 3
  • 11
  • 16
  • In general, no - don't try to install two different versions of the same package in one python environment. I did not get why you need both the old and the new version. Does the new version break your code? Can you clarify that part a bit? – cel Dec 13 '14 at 20:40
  • @cel: The new version breaks the most essential part of my code (selection p- and q-values with "sm.tsa.ARMA()). Everything else works just fine. So i would like to keep the old version for running sm.tsa.ARMA(). The new version contains some very useful parts which i want to run in the same code, namely from "statsmodels.tsa.stattools..." So i tried to copy the stattools.py source-code in the directory from where i run my code in order to import it as a module in my code. Unfortunately the soure-code is linked to some other parts within the new version so guess i need the whole new version. – Peter Knutsen Dec 14 '14 at 13:57
  • Unfortunately, it seems that the statsmodels developers decided to make some backwards incompatible changes to the ARMA model. But running two statsmodels versions in parallel is probably not possible - and if it is, it will be extremely hackish. I would suggest looking into `statsmodels` documentation and update your code to work with the recent `statsmodels` version. If that is not feasible due to too much overhead, I am afraid you will have no choice but stick with the old version. – cel Dec 14 '14 at 14:48

0 Answers0