• linux安装fbprophet程序库


    工作需要用到Facebook的fbprophet算法,需要安装对应的工具包,网上翻看了各路大神的帖子,但踩了无数坑之后,终于安装成功,这里总结一下安装过程,服务器操作系统为CentOS Linux release 7.8.2003 (Core)

    1 安装dnf工具、gcc和gcc-c++

    yum install dnf
    
    • 1
    dnf install gcc
    
    • 1
    dnf install gcc-c++
    
    • 1

    2 新建一个conda环境,python版本为3.7

    (base) [root@localhost ~]# conda create -n times python=3.7
    
    • 1

    3 安装python3-devel

    yum install python-devel
    yum install python3-devel
    
    • 1
    • 2

    4 安装cython、pystan、fbprophet

    pip3 install cython
    
    • 1

    安装pystan

    python3 -m pip install --default-timeout=1000 pystan==2.17.1.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
    
    • 1

    其中安装pystan的过程将变得非常漫长,特别是终端出现下面的信息时,需要耐心等待
    在这里插入图片描述

    如果最后出现以下结果,则表示虽然前面有报错,但最后还是安装成功
    在这里插入图片描述

    安装fbprophet

    python3 -m pip install --default-timeout=1000 fbprophet -i https://pypi.tuna.tsinghua.edu.cn/simple
    
    • 1

    如果最后出现以下结果,则表示虽然前面有报错,但最后还是安装成功
    在这里插入图片描述

    5 测试安装结果

    pip list
    
    • 1

    在这里插入图片描述
    在终端输入python,然后输from fbprophet import Prophet看看能否导入相关的模块,如果出现一下信息,则安装对应的工具包

    (times) [root@localhost ~]# python
    Python 3.7.12 | packaged by conda-forge | (default, Oct 26 2021, 06:08:21) 
    [GCC 9.4.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from fbprophet import Prophet
    Importing plotly failed. Interactive plots will not work.
    >>> 
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8

    这里提示缺plotly,那就安装

    pip install plotly
    
    • 1

    继续测试能否导入相关模块

    (times) [root@localhost ~]# python
    Python 3.7.12 | packaged by conda-forge | (default, Oct 26 2021, 06:08:21) 
    [GCC 9.4.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from fbprophet import Prophet
    >>> 
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7

    至此,安装工作完成。

  • 相关阅读:
    Maixll-Dock 摄像头使用
    linux下硬盘分区和格式化和挂载以及启动自动挂载
    1024程序员节,给大家送份福利
    Midjourney AI绘画咒语与生成的作品(实例)
    【附源码】Python计算机毕业设计融资租赁管理系统
    深入了解快速排序:原理、性能分析与 Java 实现
    Seata 源码篇之AT模式启动流程 - 下 - 04
    Java异常分类总结
    二十三、CANdelaStudio深入-SnapshotData编辑
    Arrays.asList() 和 Collections.singletonList()
  • 原文地址:https://blog.csdn.net/weixin_44457930/article/details/127573634