简体   繁体   中英

Why won't this prophet Python module import? I have tried everything possible

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM