fbprophet安装

facebook开源了时间序列预测框架prophet,目前支持R语言和python语言。
那么,如何使用呢,在这里推荐一种方法:
一:安装anaconda
原因:prophet安装包一般需要与numpy,pandas,matplotlib一起使用,并且使用pip安装fbprophet时容易出错

import pandas as pd
import numpy as np
from fbprophet import Prophet
import matplotlib.pyplot as plt
import happybase

二,重点,安装fbprophet
fbprophet依赖于PyStan,而PyStan,首先要安装C++编译器Visual C++ Build Tools
第一步,安装c++编译器:
https://www.microsoft.com/en-us/download/confirmation.aspx?id=42642

第二步,安装pystan:
在安装之前,首先看一段官网的说明:
PyStan on Windows
PyStan is partially supported under Windows with the following caveats:
Python 2.7: Doesn’t support parallel sampling. When drawing samples n_jobs=1 must be used)
Python 3.5 or higher: Parallel sampling is supported
MSVC compiler is not supported.
pystan只支持Python3.5以上版本哦

s://anaconda.org/search?q=pystan
在这里插入图片描述
如上图所示,可以直观的看到所支持的版本
在这里插入图片描述
用这个命令安装就可以了,注意,conda-forge

第三步,安装fbprophet:
在这里插入图片描述
在这里插入图片描述
注意,conda-forge

第二步,第三步配套搭配,直接就会安装成功了,如果使用其他命令,会有版本冲突的哦.
比如:
pip install pystan 当然也可以安装,并且还是最新的版本,但是,安装fbprophet的时候,如果使用conda install -c conda-forge fbprophet仍然会提示需要安装pystan

猜你喜欢

转载自blog.csdn.net/weixin_42367527/article/details/83182284
今日推荐