2015-09-25 147 views
1

我使用的是Ubuntu 14.04.3和最新版本的anaconda。pystan:distutils.errors.CompileError:命令'gcc'失敗,退出狀態1

當pystan試圖編譯模型,我得到以下錯誤:

distutils.errors.CompileError: command 'gcc' failed with exit status 1 

當我在工作中我的RHEL服務器上運行的模式,一切工作正常。

安裝pystan之前,我跑

apt-get install build-essential 

我試着用蟒蛇和建築從源代碼安裝斯坦,我仍然得到錯誤。

我不知道接下來要做什麼。

編輯:完整的錯誤輸出低於

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 
+1

你有完整的錯誤輸出嗎?你能提供嗎? –

回答

0

如果任何人有同樣的問題,以下步驟修復該問題

  1. 卸載蟒蛇
  2. 安裝蟒蛇
  3. 安裝pystan使用點數

不知道爲什麼工作。

相關問題