安装pyjags的又一次失败

2024-09-30 01:23:12 发布

您现在位置:Python中文网/ 问答频道 /正文

请帮助我在Anaconda windows环境中安装pyjags。pip和easy_install都会给出如下错误消息:

>pip install pyjags
Collecting pyjags
  Using cached pyjags-1.2.2.tar.gz (79 kB)
    ERROR: Command errored out with exit status 1:
     command: 'c:\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\aliyu\\AppData\\Local\\Temp\\pip-install-odiec3d9\\pyjags\\setup.py'"'"'; __file__='"'"'C:\\Users\\aliyu\\AppData\\Local\\Temp\\pip-install-odiec3d9\\pyjags\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\aliyu\AppData\Local\Temp\pip-install-odiec3d9\pyjags\pip-egg-info'
         cwd: C:\Users\aliyu\AppData\Local\Temp\pip-install-odiec3d9\pyjags\
    Complete output (5 lines):
    Package jags was not found in the pkg-config search path.
    Perhaps you should add the directory containing `jags.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'jags' found
    Error while executing pkg-config: Command '['pkg-config', '--libs', '--cflags', 'jags']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command error out with exit status 1: python setup.py egg_info Check the logs for full command output.
>easy_install pyjags
WARNING: The easy_install command is deprecated and will be removed in a future version.
Searching for pyjags
Reading https://pypi.org/simple/pyjags/
Downloading [files.pythonhosted][1]
Best match: pyjags 1.2.2
Processing pyjags-1.2.2.tar.gz
Writing C:\Users\aliyu\AppData\Local\Temp\easy_install-b_pvpypz\pyjags-1.2.2\setup.cfg
Running pyjags-1.2.2\setup.py -q bdist_egg --dist-dir C:\Users\aliyu\AppData\Local\Temp\easy_install-b_pvpypz\pyjags-1.2.2\egg-dist-tmp-3sqcbrtt
Package jags was not found in the pkg-config search path.
Perhaps you should add the directory containing `jags.pc'
to the PKG_CONFIG_PATH environment variable
No package 'jags' found
Error while executing pkg-config: Command '['pkg-config', '--libs', '--cflags', 'jags']' returned non-zero exit status 1.
error: Setup script exited with 1

我期待你的帮助


Tags: installpiptheconfigegglocaleasysetup
1条回答
网友
1楼 · 发布于 2024-09-30 01:23:12

错误很明显:

Package jags was not found

快速查看一下pypi project page会发现同样的情况:

PyJAGS provides a Python interface to JAGS

所以pyjags只是jags的接口。为了使用这个接口(并且首先安装它),您需要有jags。官方上,有可用的windows文件from here,但是pyjags官方上只支持POSIX操作系统(也请参见pypi project page),因此即使您设法让JAG在您的操作系统上工作,也不能保证它是可安装的

相关问题 更多 >

    热门问题