SandboxViolation error when installing statsmodels with easy_install

一笑奈何 提交于 2019-12-07 13:48:14

问题


I tried to install statsmodels Python library on a Fedora 19 system. I used easy_install as follows:

easy_install -U statsmodels

But I get the following error while installing:

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.

What's wrong here?


回答1:


In the setup.py in source, add

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

after import os Then I got the following error when I called the

python setup.py install 

from the statsmodels directory.

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")

pasty was missing in the system. So only thing I had to do was installing pasty. using

easy_install --upgrade patsy

then I could install statsmodels from the source in the normal way.



来源:https://stackoverflow.com/questions/18702477/sandboxviolation-error-when-installing-statsmodels-with-easy-install

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!