无法安装 pyjags

Fail to install pyjags

我的 python 版本是 2.7。我尝试使用 pip install pyjags 安装 pyjags 但出现这样的错误:

Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/dh/cyj9qhyj271945lvydyv5yr80000gn/T/pip-build-yuHm33/pyjags/setup.py", line 68, in <module>
        add_jags(ext)
      File "/private/var/folders/dh/cyj9qhyj271945lvydyv5yr80000gn/T/pip-build-yuHm33/pyjags/setup.py", line 46, in add_jags
        version = add_pkg_config(ext, 'jags')
      File "/private/var/folders/dh/cyj9qhyj271945lvydyv5yr80000gn/T/pip-build-yuHm33/pyjags/setup.py", line 34, in add_pkg_config
        output = subprocess.check_output(args)
      File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 566, in check_output
        process = Popen(stdout=PIPE, *popenargs, **kwargs)
      File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
        errread, errwrite)
      File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
        raise child_exception
    OSError: [Errno 2] No such file or directory

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/dh/cyj9qhyj271945lvydyv5yr80000gn/T/pip-build-yuHm33/pyjags

pip 不是受支持的安装方法。阅读网站 enter link description here.

上的安装说明

我刚刚部署了一个 python 包,当我尝试通过 pip 安装时出现了同样的错误。结果发现主要原因是项目工件(静态文件等)未包含在 MANIFEST 文件中或无法加载文件路径。我想您可能需要查阅文档 here.

下面这行是从文档中复制的:

setup.py 脚本使用 pkg-config 定位 JAGS 库。如果 JAGS 安装在一些非标准位置,那么您可能需要配置 pkg-config 以获取正确的元数据文件。例如,如果已使用 --prefix=/opt/ 配置 JAGS,则 JAGS 元数据文件将位于 /opt/lib/pkgconfig/ 中。此路径可以包含在 pkg-config 搜索路径中,如下所示:

导出PKG_CONFIG_PATH=/opt/lib/pkgconfig/:$PKG_CONFIG_PATH

从您的跟踪记录来看,您似乎没有配置它。