Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fbprophet working from command line but not from jupyter (for python) #1581

Closed
irinawetransfer opened this issue Jul 16, 2020 · 1 comment
Closed

Comments

@irinawetransfer
Copy link

Please do refer me to the related ticket if one exists, I couldn't find one, apologies if this is a dup!

My issue

I'm working in Python. I have successfully installed Prophet (together with all the prerequisites such as pystan), I am able to import it when I run a *.py script from command line:

#!/usr/bin/python

import pystan
import pandas as pd
from fbprophet import Prophet

-- executing this produces no errors.

But when I try to import it in a jupyter notebook cell, I simply get ModuleNotFoundError: No module named 'fbprophet' .

I can see from Jupyter that it is recognized as installed package:
Screenshot 2020-07-16 at 10 16 19

More info about my installation

My OS:

  • ProductName: Mac OS X
  • ProductVersion: 10.15.5
  • BuildVersion: 19F101

Python / Anaconda:

  • Python 3.7.6
  • anaconda-client 1.7.2
  • anaconda-navigator 1.9.12
  • anaconda-project 0.8.3

Prophet-related packages' versions:

  • fbprophet 0.6
  • holidays 0.10.2
  • pystan 2.19.1.1
@bletham
Copy link
Contributor

bletham commented Jul 21, 2020

I think what's happening here is that you have at least 2 installations of Python, and fbprophet is installed in the system python but not in the python that Jupyter is using (which I'm guessing is the Anaconda python). Anaconda will usually set up its own python environments, so that you can manage multiple installs with potentially different versions. pip will only install to the system python. To install fbprophet in the Anaconda you can use

conda install -c conda-forge fbprophet

To verify that these are different python installs, you could try

import sys
print(sys.version)

in your command line python, and in Jupyter, and see if they are different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants