windows 安装pyjags失败

jobtbby3  于 2023-05-19  发布在  Windows
关注(0)|答案(2)|浏览(207)

请帮助我安装pyjags在Anaconda的Windows环境。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

我期待你的帮助。

h9a6wy2h

h9a6wy2h1#

这个错误很明显:
Package jags was not found
快速浏览一下pypi项目的页面,也会发现同样的情况:
PyJAGS为JAGS提供了一个Python接口
所以pyjags只是jags的一个接口。为了使用这个接口(首先安装它),你需要有jags。官方上,有可用的windows文件from here,但是pyjags官方上只支持POSIX操作系统(也请参阅pypi项目页面),因此即使您设法让JAGS在您的操作系统上工作,也不能保证它是可安装的

g52tjvyc

g52tjvyc2#

真的很晚了,但作为一个值得回答的问题,从pyjags page
PyJAGS适用于MacOS和Linux。目前不支持Windows。

相关问题