14

My build keeps failing on windows 10 for installing fbprophet in anaconda with the following message:

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

the command that is given is:

conda install -c conda-forge fbprophet

Has anyone successfully installed fbprophet on Windows 10? If yes, then please give the steps.

Thanks. I tried pip install as well but no luck. I have a Mac and managed to install fbprophet on it without any issues.

Gonçalo Peres
  • 11,752
  • 3
  • 54
  • 83
Bharat
  • 2,409
  • 6
  • 32
  • 57
  • As of v1.0, the package name is `prophet`; prior to v1.0 it was `fbprophet`. Given that, already updated [my answer](https://stackoverflow.com/a/64878241/7109869). – Gonçalo Peres Jul 28 '22 at 07:31

9 Answers9

26
  1. First install Anaconda or miniconda in your Windows machine and add conda python path to env variable as default python.

  2. Open your command prompt and run following commands.

  3. Create a conda virtual environment (optional)

    conda create -n v-env python=3.7
    
    activate v-env
    
  4. Install c++ complier

    conda install libpython m2w64-toolchain -c msys2
    

    libpython will automatically create and setup distutils.cfg file for you in PYTHONPATH\Lib\distutils, but if that is failed use the following instructions to setup it manually

    [OPTIONAL]

    create distutils.cfg with text editor (e.g. notepad, notepad++) and add the following lines to that file.

    [build]
    compiler=mingw32
    
  5. Install dependencies

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

    pip install pystan
    
    or 
    
    conda install pystan -c conda-forge
    
  7. Install Ephem

    conda install -c anaconda ephem
    
  8. Install fbprophet

    pip install fbprophet
    
    or 
    
    conda install -c conda-forge fbprophet
    
theDreamer911
  • 85
  • 1
  • 9
Akash Ukarande
  • 401
  • 3
  • 5
  • I was getting "CondaHTTPError: HTTP 000 CONNECTION FAILED for u". I followed https://stackoverflow.com/questions/50125472/issues-with-installing-python-libraries-on-windows-condahttperror-http-000-co – kravi Jul 05 '22 at 16:25
  • N.B., The package was renamed from "fbprophet" to "prophet" for version >= v1.0.0. As of 7/22/2022, Python 3.7 or higher is now required. For details see: https://facebook.github.io/prophet/docs/installation.html – Rich Lysakowski PhD Jul 28 '22 at 03:27
  • @Akash Ukarande ... After the step "create distutils.cfg with text editor" where should the [OPTIONAL] file "distutils.cfg" be located? – Rich Lysakowski PhD Jul 28 '22 at 03:47
12

I also faced installing facebook prophet issue in windows 10 without conda. But,we can solve it. First, uninstall any pystan, fbprophet. Then follow the steps below,

python.exe -m pip install pystan==2.17.1.0
python.exe -m pip install fbprophet==0.6   
python.exe -m pip install --upgrade fbprophet

Thanks, tsj

sundarr
  • 385
  • 2
  • 8
  • 1
    Does not work for me on Python 3.8; fails at step "Building wheel for pystan". [IgorJerosimić](https://stackoverflow.com/users/111433/igor-jerosimi%c4%87) : Which C++ compiler do you have? (Tried with rtools 4.0 which includes mingw32) – pruefsumme Aug 09 '21 at 14:13
  • Worked for me too, and I just did a pip install fbprophet, instead of install and upgrade, after the pystan install, so probably something to do with the pystan version. In this link https://facebook.github.io/prophet/docs/installation.html#installation-in-python, they mention pystan version 2.19.1.1 – racerX Aug 26 '21 at 23:13
  • N.B., The package was renamed from "fbprophet" to "prophet" for version >= v1.0.0. As of 7/22/2022, Python 3.7 or higher is now required. For details see: https://facebook.github.io/prophet/docs/installation.html – Rich Lysakowski PhD Jul 28 '22 at 03:27
10

Updated: 28 July 2022

As of v1.0, the package name on PyPI is "prophet"; prior to v1.0 it was "fbprophet". fbprophet is now just prophet. A few additional considerations:

  • From v0.6 onwards, Python 2 is no longer supported.

  • As of v1.1, the minimum supported Python version is 3.7.

Below one will find how to

  1. Install with PyPI

  2. Install with Anaconda

  3. Install the Development version


1. Istallation in Python using PyPI

Prophet is on PyPI, so one can use pip to install it.

python -m pip install prophet

2. Installation in Python using Anaconda

One might have to access Anaconda Prompt for the environment that one is working with as admin:

Access Anaconda Prompt as admin

And run

conda install -c conda-forge prophet 

Or

conda install -c conda-forge prophet -y 

3. Development version

To get the latest code changes as they are merged, one can clone this repo and build from source manually. This is not guaranteed to be stable.

git clone https://github.com/facebook/prophet.git
cd prophet/python
python -m pip install -r requirements.txt
python setup.py develop

By default, Prophet will use a fixed version of cmdstan (downloading and installing it if necessary) to compile the model executables. If this is undesired and one would like to use one's existing cmdstan installation, one can set the environment variable PROPHET_REPACKAGE_CMDSTAN to False:

export PROPHET_REPACKAGE_CMDSTAN=False;

Sources

  1. https://facebook.github.io/prophet/docs/installation.html

  2. https://github.com/facebook/prophet

Gonçalo Peres
  • 11,752
  • 3
  • 54
  • 83
8

I've had the same problem. But it works after I follow this steps:

On Prompt install Ephem:

conda install -c anaconda ephem

Install Pystan:

conda install -c conda-forge pystan

Finally install Fbprophet

conda install -c conda-forge fbprophet

Igor Skoric
  • 634
  • 4
  • 15
Luana Formiga
  • 81
  • 1
  • 1
  • N.B., The package was renamed from "fbprophet" to "prophet" for version >= v1.0.0. As of 7/22/2022, Python 3.7 or higher is now required. For details see: https://facebook.github.io/prophet/docs/installation.html – Rich Lysakowski PhD Jul 28 '22 at 03:27
3

Latest installation code for 2021:

pip install pystan==2.19.1.1, then pip install prophet

Also, reboot your jupyter notebook after installation

Stanley
  • 801
  • 2
  • 10
  • 20
Inuganhu
  • 31
  • 4
  • N.B., The "fbprophet" package was renamed from "fbprophet" to "prophet" for version >= v1.0.0. Also, as of 7/22/2022, Python 3.7 or higher is now required. For details see: facebook.github.io/prophet/docs/installation.html – Rich Lysakowski PhD Jul 28 '22 at 03:45
2

Install without Conda, Win 10, Python 3.8.8 64 bit.

pip3 install Cython

Then install:

Reboot your maching

Install

pip3 install pystan==2.17.1.0

pip3 install fbprophet
Buddy Bob
  • 5,829
  • 1
  • 13
  • 44
  • Do you mean "for Macintosh or Linux, NOT Windows"? Your answer title is confusing, but the use of "pip3" indicates that you are on a Mac or Linux platform. Please clarify. Thank you. – Rich Lysakowski PhD Jul 28 '22 at 03:29
1

Here's my solution. I have not use conda-forge before, so reading up on this article helps.

  1. Making sure that conda is ≥4.9
conda --version
  1. add conda forge channel
conda config --add channels conda-forge
conda --set channel_priority strict
  1. install gcc
conda install gcc
  1. install prophet
conda install -c conda-forge prophet

I used the prophet documentation here

0

I faced the same issue and my solution was to:-

Create a new environment with Python3.5

conda create -n pht python=3.5 anaconda

Install Prophet using the command.

conda install -c conda-forge fbprophet

I didn't install 'gcc' although this was advised before installing Prophet.

Regi Mathew
  • 2,603
  • 3
  • 24
  • 38
0

I am using Python 3.8.5 and conda 4.10.1 on a Windows 10 machine. I was able to install prophet in Anaconda 2.0.1 using command prompt (not as admin), using: conda install -c conda-forge fbprophet It took some time for it to figure out the details, as you can see from the prompts below, but finally it was able to install the package.

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done
uditgt
  • 139
  • 1
  • 1