![](/img/trans.png)
[英]PyStan: CompileError: command 'gcc' failed with exit status 1 (macos)
[英]pystan: distutils.errors.CompileError: command 'gcc' failed with exit status 1
我正在使用Ubuntu 14.04.3和最新版本的anaconda。
當pystan嘗試編譯模型時,出現以下錯誤:
distutils.errors.CompileError: command 'gcc' failed with exit status 1
當我嘗試在工作的RHEL服務器上運行模型時,一切正常。
在安裝pystan之前,我跑了
apt-get install build-essential
我嘗試使用anaconda安裝stan並從源代碼構建,但仍然出現錯誤。
我不知道下一步該怎么做。
編輯:完整的錯誤輸出如下
INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_900950b5a4d15a106db93874d106a01d NOW.
Traceback (most recent call last):
File "schools.py", line 63, in <module>
main()
File "schools.py", line 59, in main
output = fit()
File "schools.py", line 54, in fit
res = pystan.stan(model_code=pasted_code(), data=model_data, iter=1000, chains=4)
File "/home/hahdawg/anaconda/lib/python2.7/site-packages/pystan/api.py", line 373, in stan
save_dso=save_dso, verbose=verbose)
File "/home/hahdawg/anaconda/lib/python2.7/site-packages/pystan/model.py", line 319, in __init__
build_extension.run()
File "/home/hahdawg/anaconda/lib/python2.7/distutils/command/build_ext.py", line 337, in run
self.build_extensions()
File "/home/hahdawg/anaconda/lib/python2.7/distutils/command/build_ext.py", line 446, in build_extensions
self.build_extension(ext)
File "/home/hahdawg/anaconda/lib/python2.7/distutils/command/build_ext.py", line 496, in build_extension
depends=ext.depends)
File "/home/hahdawg/anaconda/lib/python2.7/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/home/hahdawg/anaconda/lib/python2.7/distutils/unixccompiler.py", line 122, in _compile
raise CompileError, msg
distutils.errors.CompileError: command 'gcc' failed with exit status 1
如果任何人都有相同的問題,請按照以下步驟解決問題
不知道為什么這樣做。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.