EPD 7.1
MacOS 10.6.x
的学术分布为0.3
,其中有pandas 0.5.0
版本。最新的正式版本是zip
所以我虽然升级到最新版本。
这是我做的:
sudo python setup.py install
文件
nosetests pandas
======================================================================
ERROR: test_generate (test_daterange.TestGeneration)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/pandas/core/tests/test_daterange.py", line 20, in test_generate
rng2 = list(generate_range(START, END, timeRule='WEEKDAY'))
TypeError: generate_range() got an unexpected keyword argument 'timeRule'
请记住,我是python的新手。任何有关我的安装失败原因的见解将不胜感激。以下是错误的片段。整个日志可以在Error log
找到结果:
在55.011s中进行了1498次测试 失败(跳过= 4,错误= 91,失败= 14)
sudo python setup.py install
@wesm - 感谢您的快速回复。下次我肯定会使用邮件列表。所以我实际上回溯了......安装了官方0.5.0版本并从源代码编译。我收到了3个错误(见下文)。我没有遇到任何运行======================================================================
ERROR: testForSeries (pandas.stats.tests.test_ols.TestPanelOLS)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/pandas/stats/tests/test_ols.py", line 472, in testForSeries
self.series_x, self.series_y)
File "/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/pandas/stats/tests/test_ols.py", line 565, in checkForSeries
reference = ols(y=series_y, x=series_x, **kwds)
File "/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/pandas/stats/interface.py", line 133, in ols
return klass(**kwargs)
File "/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/pandas/stats/ols.py", line 36, in __init__
import scikits.statsmodels.api as sm
ImportError: No module named api
======================================================================
ERROR: testNonPooled (pandas.stats.tests.test_ols.TestPanelOLS)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/pandas/stats/tests/test_ols.py", line 522, in testNonPooled
self.checkNonPooled(y=self.panel_y, x=self.panel_x)
File "/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/pandas/stats/tests/test_ols.py", line 528, in checkNonPooled
result = ols(y=y, x=x, pool=False, **kwds)
File "/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/pandas/stats/interface.py", line 133, in ols
return klass(**kwargs)
File "/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/pandas/stats/plm.py", line 780, in __init__
nw_overlap=nw_overlap)
File "/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/pandas/stats/interface.py", line 133, in ols
return klass(**kwargs)
File "/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/pandas/stats/ols.py", line 36, in __init__
import scikits.statsmodels.api as sm
ImportError: No module named api
======================================================================
ERROR: test_auto_rolling_window_type (pandas.stats.tests.test_ols.TestPanelOLS)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/pandas/stats/tests/test_ols.py", line 604, in test_auto_rolling_window_type
window_model = ols(y=y, x=data, window=20, min_periods=10)
File "/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/pandas/stats/interface.py", line 133, in ols
return klass(**kwargs)
File "/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/pandas/stats/ols.py", line 521, in __init__
OLS.__init__(self, y=y, x=x, **self._args)
File "/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/pandas/stats/ols.py", line 36, in __init__
import scikits.statsmodels.api as sm
ImportError: No module named api
{{1}}
答案 0 :(得分:1)
提问这个问题的最佳位置是mailing list(幸运的是Google快讯让我立即了解这个问题!)。看起来您的安装失败了,它仍在使用pandas 0.3.0。您运行python setup.py install
时是否有任何错误?如果您使用git快照(sudo easy_install -U Cython
)构建,则可能必须升级Cython安装。如果这不起作用,请尝试修改现有的pandas install:
sudo rm -rf /Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/pandas
并重新安装。 PyPI上的tarball包含预先构建的Cython源代码。无论如何,如果你是从源码构建的,我建议从git的头版本构建。我距离释放大熊猫0.6.0还有几天。
答案 1 :(得分:1)
问题解决了:
1)安装Wes于2011年11月25日发布的pandas 0.6.0版本。
2)删除现有的scikits包,它与EPD 7.1(版本0.2)捆绑在一起,并使用'easy_install -U scikits.statsmodels'安装最新版本。
以上是Wes和人们在pystatsmodel邮件列表上提出的建议(谢谢大家)。