我的python版本是2.7
。我尝试使用pyjags
安装pip install 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
答案 0 :(得分:1)
当我尝试通过pip
安装时,我刚刚部署了一个python包并遇到了同样的错误。原来的主要原因是项目工件(静态文件等)未包含在MANIFEST文件中,或者无法加载文件路径。我想您可能想查阅文档here。
以下行是从文档中复制的:
setup.py脚本使用 pkg-config 来查找JAGS库。如果JAGS安装在某个非标准位置,则可能需要配置pkg-config以获取正确的元数据文件。例如,如果已使用--prefix = / opt /配置了JAGS,则JAGS元数据文件将位于/ opt / lib / pkgconfig /中。此路径可以包含在pkg-config搜索路径中,如下所示:
export PKG_CONFIG_PATH = / opt / lib / pkgconfig /:$ PKG_CONFIG_PATH
从您的跟踪跟踪中,您似乎无法配置它。
答案 1 :(得分:0)
pip
不是受支持的安装方法。阅读网站enter link description here上的安装说明。