Prophet安装教程

写在前面

Prophet安装会遇到的主要问题是版本冲突,其中又主要是pystan和fbprophet的版本问题。这里用conda安装,指定版本的话三步可完成,如果是新建的虚拟环境不会遇到其它问题。

先安装其它库,prophet相关库最后安装
强烈建议使用conda安装,关键词:指定版本!

可能需要的前置知识:

  1. conda新建虚拟环境以及其它常用命令在这
  2. conda的channels设置,我是直接修改的配置文件,最终的channels地址:
channels:
  - defaults
show_channel_urls: true
default_channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
  conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch-lts: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

不解决channels的话容易遇到下面这个报错

Solving environment: failed with initial frozen solve.

一、安装pystan

conda install pystan==2.19.1.1

指定2.X的版本原因:

  1. 避免import失败 ,参考这里,pystan3.X版本替换了import语句。指定2.X之后可避免:

ModuleNotFoundError: No module named ‘pystan’;

二、安装fbprophet

conda install fbprophet==0.7.1 -c conda-forge

Prophet有prophetfbprophet两个包可以安装,我这里用的是fbprophet

指定0.7.1的原因:

  1. 避免holidays包版本出现冲突,fbprophet版本0.5以下适配的holidays包版本较低,报错如下:

ImportError: cannot import name ‘easter’ from ‘holidays’

三、安装plotly

conda install plotly
  • 5
    点赞
  • 39
    收藏
    觉得还不错? 一键收藏
  • 8
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值