首页 > 解决方案 > 在 Windows 10 上安装 fbprophet Python

问题描述

我的构建在 Windows 10 上一直失败,无法在 anaconda 中安装 fbprophet,并显示以下消息:

ERROR conda.core.link:_execute(502): An error occurred while installing package 'conda-forge::automat-0.7.0-py_1'.
CondaError: Cannot link a source that does not exist. C:\Users\bharat.c.ruparel\AppData\Local\Continuum\anaconda3\Scripts\conda.exe

给出的命令是:

conda install -c conda-forge fbprophet

有人在 Windows 10 上成功安装了 fbprophet 吗?如果是,那么请给出步骤。

谢谢。我也尝试了 pip install 但没有运气。我有一台 Mac 并设法在其上安装 fbprophet,没有任何问题。

标签: pythonwindowsanacondacondafacebook-prophet

解决方案


  1. 首先在您的 Windows 机器中安装 Anaconda 或 miniconda,并将 conda python 路径添加到 env 变量作为默认 python。

  2. 打开命令提示符并运行以下命令。

  3. 创建 conda 虚拟环境(可选)

    conda create -n v-env python=3.7
    
    activate v-env
    
  4. 安装 c++ 编译器

    conda install libpython m2w64-toolchain -c msys2
    

    libpython 将自动distutils.cfg为您创建和设置文件PYTHONPATH\Lib\distutils,但如果失败,请使用以下说明手动设置

    [可选的]

    使用distutils.cfg文本编辑器(例如记事本、记事本++)创建并将以下行添加到该文件中。

    [build]
    compiler=mingw32
    
  5. 安装依赖项

    conda install numpy cython -c conda-forge
    
    conda install matplotlib scipy pandas -c conda-forge
    
  6. 安装 PyStan

    pip install pystan
    
    or 
    
    conda install pystan -c conda-forge
    
  7. 安装 Ephem

    conda install -c anaconda ephem
    
  8. 安装 fbprophet

    pip install fbprophet
    
    or 
    
    conda install -c conda-forge fbprophet
    

推荐阅读