3

我尝试statsmodels在 Fedora 19 系统上安装 Python 库。我使用easy_install如下:

easy_install -U statsmodels

但是安装时出现以下错误:

error: SandboxViolation: os.open('/root/.matplotlib/tmpvjSAwn', 131266, 384) {}

The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.

This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand.  Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.

这里有什么问题?

4

1 回答 1

2

在源代码的 setup.py 中,添加

os.environ["MPLCONFIGDIR"] = "." 

在 import os 之后,当我调用

python setup.py install 

从 statsmodels 目录。

Traceback (most recent call last):
  File "setup.py", line 465, in <module>
    check_dependency_versions(min_versions)
  File "setup.py", line 124, in check_dependency_versions
    raise ImportError("statsmodels requires patsy. http://patsy.readthedocs.org")

系统中缺少馅饼。所以我唯一要做的就是安装paste。使用

easy_install --upgrade patsy

然后我可以以正常方式从源安装statsmodels。

于 2013-09-10T12:03:17.603 回答