How to install fbprophet for Python 3.7 (anaconda distribution) - python

I attempted to use fbprophet for time series analysis using Python.
I ran from fbprophet import Prophet but got No module named 'fbprophet'
I think fbprophet is not part of packages that comes with anaconda distribution
I went ahead to install fbprophet but got this error message No module named 'fbprophet'
I am on Windows 10, 64 bits
I install anaconda distribution of anaconda 3.7
I have ran conda install -c conda-forge fbprophet and conda install -c conda-forge/label/cf201901 fbprophet on my anaconda prompt which it rolled endlessly
I have also ran pip install fbprohet which did not work as well
I ran pip list which worked but prophet or fbprophet not among the list
I have searched this site for relevant questions and tried all what I clues I got in it but did not work for me.

Option 1
conda install -n [NameOfVEnv] -c conda-forge fbprophet
Where -c stands for "channel" which is
the locations where Navigator and conda look for packages. (Source)
and -n for "Name of environment".
I just tried here (on CentOS 7) and it worked fine.
Option 2
An alternative, if one is using Windows 10, is to access Anaconda Prompt for the environment that you are working with as admin:
And run
conda install -c conda-forge fbprophet
I just tried here (on Windows 10 64-bit) and it worked fine.
Option 3
Prophet is on PyPI, so you can use pip to install it (Source)
# bash
# Install pystan with pip before using pip to install fbprophet
$ pip install pystan
$
$ pip install fbprophet
You may need to install dependencies (in both options), but it asks you in the prompt window. If it appears, you will need to enter Y.

I installed this way:
pip install pystan==2.19.1.1
then:
pip install prophet
It seems that currently pystan version 3 is not working properly.
(Tested on MacOS)

You can check this official github link where the detailed steps for installation is given. This library is supported only in Python 3.
Open cmd, run this command -
pip install pystan==2.19.1.1
Then run this-
pip install prophet

First install
pip install httpstan
Then Install
pip install pystan
Then Install
pip install fbprophet

I had the same issue, but none of the answers mentioned here worked (Windows 10 machine). What worked was the following:
conda config --add channels conda-forge
conda install anaconda
Above step took almost 25 hours for me. Do above only if you get this error "The environment is inconsistent, please check the package plan carefully"
pip install pystan==2.19.1.1
conda install python=3.8 (fbprophet did not work on Python 3.9)
conda install numpy=1.19.0
conda install fbprophet=0.7.1

you just search the wrong letter, please enter pip search fbprophet,in the way, i can get two

fbprophet did not work on Python 3.9
It is a very important information, after downgrading Python from 3.9 to 3.8, I use 'conda install fbprophet' install fbprophet successfully

Use conda install gcc to set up gcc. The easiest way to install Prophet is through conda-forge: conda install -c conda-forge prophet.

Related

I tried following command to install python 3.9 but my anaconda won't let python go ahead oh 3.7.9 version

Conda install -c anaconda python
I tried doing it again thinking that it might go one step further but it shows that all requested packages are already installed. I also tried:
conda install -c conda-forge python and
pip3.9 install python
None of them worked for me.

Running setup.py install for fbprophet ... error

I cannot install fbprophet or gcc7.
I have manually installed a precompiled ephem.
Running setup.py install for fbprophet ... error
I have tried with python 3.6 and 3.7. I have tried running as administrator and without.
My anaconda prompt cannot install anything without throwing errors. I would rather use pip.
The problem may be related to pystan.
File "d:\python37\lib\site-packages\pystan\api.py", line 13, in <module> import pystan._api # stanc wrapper
ImportError: DLL load failed: The specified module could not be found.
I am using windows 10.
Use:
The first step is to remove pystan and cache:
pip uninstall fbprophet pystan
pip --no-cache-dir install pystan==2.17 #any version
pip --no-cache-dir install fbprophet==0.2 #any version
conda install Cython --force
pip install pystan
conda install pystan -c conda-forge
conda install -c conda-forge fbprophet
It creates a wheel and update the environment necessary for the package. pip install fbprophet creates the similar issue.
Be sure that pystan is working.
import pystan
model_code = 'parameters {real y;} model {y ~ normal(0,1);}'
model = pystan.StanModel(model_code=model_code)
y = model.sampling().extract()['y']
y.mean() # with luck the result will be near 0
Use this link: Installing PyStan on windows
Reason: The python distribution on Anaconda3 uses an old version of gcc (4.2.x)
Please use anaconda prompt as administrator
set a new environment for a stan
conda create -n stan python=<your_version> numpy cython
install pystan and gcc inside the virtual environment.
conda activate stan
or
source activate stan
(stan) pip install pystan
(stan) pip install gcc
verify your gcc version:
gcc --version
gcc (GCC) 4.8.5
To solve this problem, I uninstalled my existing python 3.7 and anaconda. I re-installed anaconda with one key difference.
I registered Anaconda as my default Python 3.7 during the Anaconda installation. This lets visual studio, PyDev and other programs automatically detect Anaconda as the primary version to use.
I tried to import fbprophet on Python Anaconda, however, I got some errors.
This code works for me..
conda install -c conda-forge/label/cf201901 fbprophet
(Short n Sweet) For Mac users :
pip3 uninstall pystan
pip3 install pystan==2.17.1.0
pip3 install fbprophet
I used the following steps to install fbprophet 0.7.1 on windows 10 (2022-03-10):
Install anaconda here.
Install pystan by following this guide. The main line I used was conda install libpython m2w64-toolchain -c msys2. Then, install pystan using pip install pystan
Check your installation by running the following in a python terminal:
>>> import pystan
>>> model_code = 'parameters {real y;} model {y ~ normal(0,1);}'
>>> model = pystan.StanModel(model_code=model_code)
>>> y = model.sampling().extract()['y']
>>> y.mean() # with luck the result will be near 0
If the above works, proceed to install fbprophet with pip install fbprophet
Hope this works for you!
If all of the answers did not work lets clone pystan and do not use the above solutions:
git clone --recursive https://github.com/stan-dev/pystan.git
cd pystan
python setup.py install
It looks like fbprophet renamed to prophet on the FB side, so this command worked for me (Windows 10 + VSCode + Python 3.10.2)
pip install prophet --no-cache-dir

How do I install scitools module on Python3 with Anaconda?

I need to install the scitools module in Anaconda. The commands
conda install scitools
conda install --channel johannr scitools
conda install -c asmeurer scitools
don't work. I'm using Python 3 on Windows 10. I would appreciate any help.
The packages you are trying to install are only available for linux and osx, you can try with this one:
conda install -c krisvanneste scitools_no_easyviz
Though as the name states it seems to not have support for EasyViz

Can't install installed python packages

I am using Jupyter Notebook to install packages with the command: !pip install.
I just used this command to install the Options package, but it's still not showing up. I checked the default python Environment as well as the conda environment.
list of Python environments
To install packages into jupyter notebook you have to use conda instead of pip. Just find the conda install instruction for the package you are trying to install.
For example, the command to install numpy on conda is:
conda install -c anaconda numpy
instead of the regular pip version which would've been:
pip install numpy
You can search for yours by googling: conda install <package-name-you-want-to-install>.

Installed Anaconda 4.3.1 (64-bit) which contains Python 3.6 but pip3 missing, cannot install tensorflow

I downloaded the latest stable Anaconda install off the Continuum website which turned out to be Anaconda 4.3.1 (64-bit) and comes with Python 3.6.0. I am in a Windows 10 environment.
However pip3 is missing and I cannot install any Python 3.x packages via pip3.
What am I doing wrong?
If you do not have another environment installed python 3+ will default to just pip I believe since pip3 is just an alias for pip.
pip install --upgrade pip
or You can do it with the associated Python binary too; if it executable as python3, then use that:
python3 -m pip install --upgrade pip
after that check:
pip --version
otherwise just try pip-3.6
for tensorflow on conda:
pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.0.1-cp35-cp35m-win_amd64.whl
for python 3.6 due to conda providing the 3.5 one: from
pip install https://testpypi.python.org/packages/db/d2/876b5eedda1f81d5b5734277a155fa0894d394a7f55efa9946a818ad1190/tensorflow-0.12.1-cp36-cp36m-win_amd64.whl
Since this wheel had a version that is undesirable we could instead install
the wheel directly from gohlke's windows binaries repository :
download the wheel for python 3.6 from here and then install the wheel:
cd to the directory containing .whl file:
pip install some-package.whl
easy_install pip
I used it, for the problem of pip installation in miniconda.
sometimes the pip is not properly installed but it claims yes
Solution:- (Note:- This will surely work for all!!)
Step 1:- conda search python
Step 2:- conda install python=3.5.2
Step 3:- pip install tensorflow
Step 4:- import tensorflow as tf
I have Windows10, 64bit, Anaconda4.3 with Python 3.6.
Karthik' soluton worked for me. Before that I tried everything including "conda create -n tensorflow python=3.5", but it did not work (although "python --version" gave 3.5.3).
you should be able to install tensorflow using
$ conda install -c conda-forge tensorflow

Categories