fbprophet0.6安装,实测成功

Prophet安装教程

步骤:

可以在Centos机器或者虚拟机中, 选择用相同版本的python解释器,进行下载

Pip download fbprophet==0.6 -I 下载源

下载源可以是如下几种选用

清华:https://pypi.tuna.tsinghua.edu.cn/simple(比较常用,亲测速度很快)

 

阿里云:http://mirrors.aliyun.com/pypi/simple/

 

中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

 

华中理工大学:http://pypi.hustunique.com/

 

山东理工大学:http://pypi.sdutlinux.org/

 

豆瓣:http://pypi.douban.com/simple/

 

问题:

安装过程中提示如下的问题,看问题分析和解决错误,结果正常安装了

error: command 'gcc' failed with exit status

错误信息如下:

Fail to install fbprophet:INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_861b75c6337e237650a61ae58c4385ef NOW. error: command 'gcc' failed with exit status #1057

问题分析:

This usually means that the C++ compiler isn't hooked up correctly to PyStan. PyStan will successfully install even if it is not able to function correctly.

 

You can use this code to check that pystan is working (which I'm pretty sure it is not):

 

import pystan

model_code = 'parameters {real y;} model {y ~ normal(0,1);}'

model = pystan.StanModel(model_code=model_code)  # this will take a minute

y = model.sampling(n_jobs=1).extract()['y']

y.mean()  # should be close to 0

The reason it isn't working is because CentOS 7 does not support C++14, which is a new requirement for the latest version of PyStan. The solution is to downgrade to PyStan 2.18: stan-dev/pystan#583 , or upgrade from CentOS 7 to a newer OS.

 

处理措施:

The solution is to downgrade to PyStan 2.18

测试结果:

问题解决

 

安装包参考如下:

 

posted @ 2020-10-29 17:53  朝鲁梦_FQM  阅读(818)  评论(0编辑  收藏  举报