-1

I am running Python version 3.7 and trying to create a stock prediction Python program using fbprophet. However, it doesn't want to install.

I have tried importing it using pip, through python, and using conda install. Nothing seems to work. Can I get some help here?

Showing that it isn't importing

1 Answers1

1

Try with virtuanenv in python.

❯ python -m venv .venv
❯ source .venv/bin/activate
❯ pip install prophet

Then everything you installed will be in the virtual environment.

Here is the sample code.

from prophet import Prophet

print("imported successfully!")

And the output would be following:

❯ python sample.py
Fontconfig warning: ignoring UTF-8: not a valid region tag
Importing plotly failed. Interactive plots will not work.
imported successfully!

Keep in mind that, every library you installed will be only in the virtual env and you have to source first, before running the code.

  • RuntimeError: CmdStan failed to install in repackaged directory [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for prophet Failed to build prophet ERROR: Could not build wheels for prophet, which is required to install pyproject.toml-based projects – Srijan K. Dec 02 '22 at 22:19
  • Can you try installing `pip install cmdstanpy` first, then retrying install prophet? – Nasantogtokh Amarsaikhan Dec 05 '22 at 02:38