0

I want to install the package fbprophet (it may now also be known as prophet). I tried importing both like so (not all at once):

import fbprophet
import prophet
from fbprophet import Prophet
from prophet import Prophet

Error I receive is as follows:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_5908/2493871459.py in <module>
----> 1 from prophet import Prophet

ModuleNotFoundError: No module named 'prophet'

I have already gone through all the other questions asking the same problem, yet those solutions didn't work for me. I also tried changing python version to 3.7 when installing it in a new env for testing purposes.

installing prophet in jupyter nb

No module named 'fbprophet'?

Prophet / fbprophet package in Python

some code solution for installation

varunavi
  • 1
  • 3
  • If I try to install the `fbprophet` package from anaconda navigator, it is not at all visible (anaconda navigator version is 2.1.1) – varunavi Jan 03 '22 at 11:02

1 Answers1

0

My advice is to create a fresh conda environment for prophet. You will avoid conflicts and let conda retrieve without any other constraints the required dependencies. Here is how to do it as per the doc.

# create a new env called prophet
# with no other spec than prop
conda create -c conda-forge -n prophet prophet

Use the env.

# activate the env
conda activate prophet
# test
python -c "import prophet; print(prophet.__version__)"
# Importing plotly failed. Interactive plots will not work.
# 1.0

Register it as a Jupyter Kernel as per the doc

# install ipykernl
conda install ipykernel
# register it
python -m ipykernel install --user --name prophet --display-name "Prophet"

Notebook running prophet

Romain
  • 19,910
  • 6
  • 56
  • 65
  • i followed the above code, and tried importing prophet in the jupyter notebook cell using the Prophet kernel, the kernel then became dead whilst executing. However, in the anaconda terminal, when i run python and execute `import prophet` it works – varunavi Dec 31 '21 at 11:39
  • @varunavi sorry to hear that. On my side it's running like a charm from a fresh install, I've uploaded a screenshot. – Romain Dec 31 '21 at 16:43