running python with two statsmodels versions possible?

615 views Asked by At

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

0

There are 0 answers