我正在尝试使用 easy_install安装 statsmodels( http://statsmodels.sourceforge.net )(如此处推荐: http ://statsmodels.sourceforge.net/install.html )。我正在使用 Ubuntu 12.04 LTS。
问题是我在熊猫上收到 ImportError :
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1094, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 30, in run_setup
lambda: execfile(
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 72, in run
return func()
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 32, in <lambda>
{'__file__':setup_script, '__name__':'__main__'}
File "setup.py", line 201, in <module>
File "setup.py", line 53, in check_dependency_versions
ImportError: statsmodels requires pandas
但是,我已经安装了 Pandas(尽管是从源代码而不是通过 easy_install 构建的):
>>> import pandas
>>> pandas.__version__
'0.10.1'
>>> pandas.__path__
['/usr/local/lib/python2.7/dist-packages/pandas-0.10.1-py2.7-linux-i686.egg/pandas']
我怀疑 easy_install 正在查看错误的目录,但我不确定如何更改设置。我对么?如果不是,可能是什么问题?
非常感谢您提前提供的帮助!
编辑 - 这里分别是 easy_install、pip 和 python 的位置:
x@ubuntu:~$ which easy_install
/usr/bin/easy_install
x@ubuntu:~$ which pip
/usr/bin/pip
x@ubuntu:~$ which python
/usr/bin/python