facebook / prophet

Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth.
https://facebook.github.io/prophet
MIT License
18.48k stars 4.53k forks source link

Unable to install fbprophet in anaconda #892

Closed amruutharao closed 5 years ago

amruutharao commented 5 years ago

I have installed the package fbprophet using the following command conda install -c conda-forge fbprophet . I have checked the list of packages installed and it shows that fbprophet is successfully installed.

In my jupyter notebook, when i am trying to import prophet i get an error as follow. "ModuleNotFoundError: No module named 'fbprophet'" .

I tried using pip install fbprophet but it does not work because of issues in pystan. If someone knows how to install fbprophet command and import prophet , please reply .

I use the following configuration. Python : 2.7.15 anaconda2

amruutharao commented 5 years ago

@dghete ,@Gordonei , @bletham, @ivonnics , @seanjtaylor

bletham commented 5 years ago

I'm guessing that the notebook is not using the Anaconda python (but perhaps is using system python). You can check in the notebook what python is being used:

import sys
print(sys.executable)

see also https://stackoverflow.com/questions/52913748/how-to-choose-your-conda-environment-in-jupyter-notebook

amruutharao commented 5 years ago

I have checked the path it is pointing to using above command and i could understand that the path it is pointing to is C:\Users****\AppData\Local\Continuum\anaconda3\python.exe.

Not sure if i need to re configure my jupyter notebook to point to conda environment since i use tabpy server and it was affected due to an unstable package ( tornado ).

bletham commented 5 years ago

I don't actually use conda myself and so cannot be of much help in figuring out issues related to conda environments.

ivonnics commented 5 years ago

I would recommend @amruutharao to reinstall Anaconda and then, install fbprophet in a separate environment: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html

ivonnics commented 5 years ago

FYI @amruutharao :
https://stackoverflow.com/questions/22585235/python-anaconda-how-to-safely-uninstall

amruutharao commented 5 years ago

I have re installed the anaconda environment .

  1. I tried to install it with pip install fbprophet. but i get the error that
    " No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils building 'pystan._api' extension"

I am not sure why this is not stable and which package has to be upgraded or downgraded for this. Is there any earlier version for fbprophet which is stable ?

  1. I also tried using conda install -c conda-forge fbprophet . It shows " solving the environment " ... forever. I am having more issues than before and am not sure why
bletham commented 5 years ago

You definitely want to use conda forge to install it in conda. Maybe try

conda update conda

first?

amruutharao commented 5 years ago

I have tried that i ran the command "conda install -c conda-forge fbprophet"

UnsatisfiableError: The following specifications were found to be in conflict:

bletham commented 5 years ago

what does the conda info show as the dependencies for fbprophet? nothing listed there seems like it should be an issue.

ghost commented 5 years ago

https://ipython.readthedocs.io/en/stable/install/kernel_install.html#kernels-for-different-environments

Follow instructions here. You need to follow the section where it says:

'Using virtualenv or conda envs, you can make your IPython kernel in one env available to Jupyter in a different env. To do so, run ipykernel install from the kernel’s env, with –prefix pointing to the Jupyter env:'

luanaformiga commented 5 years ago

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

jjjacques commented 5 years ago

Thank You @luanaformiga running this command also install ephem and psystan $conda install -c conda-forge fbprophet

imohamedimran commented 4 years ago

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

Thank you SO very much, lunaformiga

JamieL22 commented 4 years ago
WARNING:pystan:MSVC compiler is not supported
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
TelaproluHaritha commented 4 years ago

@JamieL22 i got the same error

bhaskoro-muthohar commented 4 years ago

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

It works like a charm. You saved me!

JamieL22 commented 4 years ago

Tried again with your lead bhaskoro-muthohar. Using the Packages (PyPi) Visual Studio 2017, Tools | Python Tools | Python environment.
Version 3.6 from VS has all three commands:

Install ephem 3.7.7.1 (succeeds) Installl pystan 2.19.1.1 (succeeds) install fbprophet 0.6 failed

I see there is also a version covid-19-prophet

This too fails.

But if switching to another project, same version (3.6), same command succeeds.

ank-1rma commented 4 years ago

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

thanks, finally after 2 days

huangwan612 commented 4 years ago

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

THANK YOU SO MUCH! @luanaformiga finally solved my problem!

azdaly commented 3 years ago

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

This worked great for me! Just be aware that it won't work with pyhon 3.9 <=. I had to downgrade to python 3.7.

Rutikab12 commented 3 years ago

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

Yes this process helps. Thank You.

gur-p-reet commented 2 years ago

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

Thanks a lot @luanaformiga

Anirban095 commented 2 years ago

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

I am using streamlit where I am using fbprophet. After doing all this steps too I am seeing ModuleNotFoundError

iftesha1 commented 1 year ago
  1. Create a virtual environment using
    conda create --name myenv

  2. Activate the environment using conda activate myenv

  3. Install ephem using conda install -c anaconda ephem

  4. Install pystan using conda install -c conda-forge pystan

  5. Install the fbrprophet using conda install -c conda-forge fbprophet

  6. At the end install holidays pip install holidays==0.9.12

  7. If it still doesn't work try this at last conda install psycopg2