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

Cannot use 'pip install fbprophet' to install prophet on windows 10 with python 3.6.0 #2

Closed
moshlwx opened this issue Feb 24, 2017 · 46 comments
Labels
py

Comments

@moshlwx
Copy link

@moshlwx moshlwx commented Feb 24, 2017

Already installed python 3.60, pystan and Visual C++ 2015 Build Tools-win10

error message as follow after I use pip install fbprophet:

Command "d:\ProgramData\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\lwx\\AppData\\Local\\Temp\\pip-build-phg6epsq\\fbprophet\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\lwx\AppData\Local\Temp\pip-6ts715hu-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\lwx\AppData\Local\Temp\pip-build-phg6epsq\fbprophet\

And I tried to install from source code which I download from https://pypi.python.org/pypi/fbprophet/0.1.post1
Use python setup.py install and error message as follows:

c:\users\lwx\appdata\local\temp\tmp4z5vcu1o\anon_model_35bf14a7f93814266f16b4cf48b40a5a.hpp(368): error C2784: 'Eigen::Matrix<boost::math::tools::promote_args<RT1,RT2,float,float,float,float>::type,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> stan::math::add(const T1 &,const Eigen::Matrix<T2,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> &)': could not deduce template argument for 'const Eigen::Matrix<T2,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> &' from 'Eigen::Matrix<stan::math::var,-1,-1,0,-1,-1>' d:\ProgramData\Anaconda3\lib\site-packages\pystan\stan\lib\stan_math_2.14.0\stan/math/prim/mat/fun/add.hpp(72): note: see declaration of 'stan::math::add' c:\users\lwx\appdata\local\temp\tmp4z5vcu1o\anon_model_35bf14a7f93814266f16b4cf48b40a5a.hpp(368): error C2784: 'Eigen::Matrix<boost::math::tools::promote_args<RT1,RT2,float,float,float,float>::type,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> stan::math::add(const Eigen::Matrix<T1,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> &,const T2 &)': could not deduce template argument for 'const Eigen::Matrix<T1,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> &' from 'stan::math::var' d:\ProgramData\Anaconda3\lib\site-packages\pystan\stan\lib\stan_math_2.14.0\stan/math/prim/mat/fun/add.hpp(50): note: see declaration of 'stan::math::add' c:\users\lwx\appdata\local\temp\tmp4z5vcu1o\anon_model_35bf14a7f93814266f16b4cf48b40a5a.hpp(368): error C2784: 'Eigen::Matrix<boost::math::tools::promote_args<RT1,RT2,float,float,float,float>::type,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> stan::math::add(const Eigen::Matrix<T1,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> &,const Eigen::Matrix<T2,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> &)': could not deduce template argument for 'const Eigen::Matrix<T1,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> &' from 'stan::math::var' d:\ProgramData\Anaconda3\lib\site-packages\pystan\stan\lib\stan_math_2.14.0\stan/math/prim/mat/fun/add.hpp(27): note: see declaration of 'stan::math::add' c:\users\lwx\appdata\local\temp\tmp4z5vcu1o\anon_model_35bf14a7f93814266f16b4cf48b40a5a.hpp(368): error C2672: 'elt_multiply': no matching overloaded function found c:\users\lwx\appdata\local\temp\tmp4z5vcu1o\anon_model_35bf14a7f93814266f16b4cf48b40a5a.hpp(368): error C2672: 'stan::math::add': no matching overloaded function found c:\users\lwx\appdata\local\temp\tmp4z5vcu1o\anon_model_35bf14a7f93814266f16b4cf48b40a5a.hpp(368): error C2780: 'Eigen::Matrix<boost::math::tools::promote_args<RT1,RT2,float,float,float,float>::type,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> stan::math::add(const T1 &,const Eigen::Matrix<T2,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> &)': expects 2 arguments - 1 provided d:\ProgramData\Anaconda3\lib\site-packages\pystan\stan\lib\stan_math_2.14.0\stan/math/prim/mat/fun/add.hpp(72): note: see declaration of 'stan::math::add' c:\users\lwx\appdata\local\temp\tmp4z5vcu1o\anon_model_35bf14a7f93814266f16b4cf48b40a5a.hpp(368): error C2780: 'Eigen::Matrix<boost::math::tools::promote_args<RT1,RT2,float,float,float,float>::type,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> stan::math::add(const Eigen::Matrix<T1,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> &,const T2 &)': expects 2 arguments - 1 provided d:\ProgramData\Anaconda3\lib\site-packages\pystan\stan\lib\stan_math_2.14.0\stan/math/prim/mat/fun/add.hpp(50): note: see declaration of 'stan::math::add' c:\users\lwx\appdata\local\temp\tmp4z5vcu1o\anon_model_35bf14a7f93814266f16b4cf48b40a5a.hpp(368): error C2780: 'Eigen::Matrix<boost::math::tools::promote_args<RT1,RT2,float,float,float,float>::type,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> stan::math::add(const Eigen::Matrix<T1,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> &,const Eigen::Matrix<T2,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> &)': expects 2 arguments - 1 provided d:\ProgramData\Anaconda3\lib\site-packages\pystan\stan\lib\stan_math_2.14.0\stan/math/prim/mat/fun/add.hpp(27): note: see declaration of 'stan::math::add' c:\users\lwx\appdata\local\temp\tmp4z5vcu1o\anon_model_35bf14a7f93814266f16b4cf48b40a5a.hpp(368): error C2672: 'normal_log': no matching overloaded function found c:\users\lwx\appdata\local\temp\tmp4z5vcu1o\anon_model_35bf14a7f93814266f16b4cf48b40a5a.hpp(368): error C2974: 'stan::math::normal_log': invalid template argument for 'T_y', type expected d:\ProgramData\Anaconda3\lib\site-packages\pystan\stan\lib\stan_math_2.14.0\stan/math/prim/scal/prob/normal_log.hpp(120): note: see declaration of 'stan::math::normal_log' c:\users\lwx\appdata\local\temp\tmp4z5vcu1o\anon_model_35bf14a7f93814266f16b4cf48b40a5a.hpp(368): error C2780: 'return_type<T_y,T_loc,T_scale,double,double,double>::type stan::math::normal_log(const T_y &,const T_loc &,const T_scale &)': expects 3 arguments - 2 provided d:\ProgramData\Anaconda3\lib\site-packages\pystan\stan\lib\stan_math_2.14.0\stan/math/prim/scal/prob/normal_log.hpp(44): note: see declaration of 'stan::math::normal_log' c:\users\lwx\appdata\local\temp\tmp4z5vcu1o\anon_model_35bf14a7f93814266f16b4cf48b40a5a.hpp(368): error C2672: 'stan::math::accumulator<T__>::add': no matching overloaded function found with [ T__=stan::math::var ] error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

@ritviksahajpal

This comment has been minimized.

Copy link

@ritviksahajpal ritviksahajpal commented Feb 24, 2017

Thanks for an excellent and exciting package!

I can second this install error error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2 I am on Windows 10 and using python 3.6 as well

@seanjtaylor

This comment has been minimized.

Copy link
Collaborator

@seanjtaylor seanjtaylor commented Feb 24, 2017

Yes installation on Windows is a known problem. Are you able to install the pystan package? We think it's an upstream pystan problem.

@ritviksahajpal

This comment has been minimized.

Copy link

@ritviksahajpal ritviksahajpal commented Feb 24, 2017

@seanjtaylor , thanks for your reply. I was able to install pystan but only through python setup.py install and not through pip install pystan. Doing python setup.py install for fbprophet does not work. Really looking forward to trying it out.

@seanjtaylor

This comment has been minimized.

Copy link
Collaborator

@seanjtaylor seanjtaylor commented Feb 24, 2017

I'll get a Windows machine and try to replicate soon. Another thing to test if you have pystan installed is compiling one of the models in the package:

import pystan
sm = pystan.StanModel(model_code=open('stan/prophet_linear_growth.stan').read())
@ritviksahajpal

This comment has been minimized.

Copy link

@ritviksahajpal ritviksahajpal commented Feb 24, 2017

thanks @seanjtaylor , I tried your code with a couple of .stan files here: https://github.com/stan-dev/example-models/tree/master/basic_estimators

I am able to import pystan ok.

However on the .read() line, I get an error: UnicodeEncodeError: 'ascii' code can't encode characters in position 698-699: ordinal not in range(128). Not sure why this error is arising since I am using python 3.6 which is unicode compliant. Will look more into this

@wangyifan1004

This comment has been minimized.

Copy link

@wangyifan1004 wangyifan1004 commented Feb 26, 2017

@seanjtaylor thks a lot ,I have troble when pip install fbprophet,then I test the pystan using your code suggested abolve and find something wrong.
Already installed python 3.53, pystan,Visual C++ 2015 Build Tools-win7
when I test the pystan :

import pystan
model_code = 'parameters {real y;} model {y ~ normal(0,1);}'
model = pystan.StanModel(model_code=model_code)
y = model.sampling(n_jobs=1).extract()['y']
y.mean() # with luck the result will be near 0
the output:
INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_5944b02c79788fa0db5b3a93728ca2bf NOW.

-0.016311821652416087
This may means that stan work well on this test.
But when I test pystan in this way :

import pystan
sm = pystan.StanModel(model_code=open('prophet_linear_growth.stan').read())
output:
INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_35bf14a7f93814266f16b4cf48b40a5a NOW.

DistutilsExecError Traceback (most recent call last)
F:\Anaconda2\envs\py33\lib\distutils_msvccompiler.py in compile(self, sources, output_dir, macros, include_dirs, debug, extra_preargs, extra_postargs, depends)
381 try:
--> 382 self.spawn(args)
383 except DistutilsExecError as msg:

F:\Anaconda2\envs\py33\lib\distutils_msvccompiler.py in spawn(self, cmd)
500 os.environ['path'] = self._paths
--> 501 return super().spawn(cmd)
502 finally:

F:\Anaconda2\envs\py33\lib\distutils\ccompiler.py in spawn(self, cmd)
908 def spawn(self, cmd):
--> 909 spawn(cmd, dry_run=self.dry_run)
910

F:\Anaconda2\envs\py33\lib\distutils\spawn.py in spawn(cmd, search_path, verbose, dry_run)
37 elif os.name == 'nt':
---> 38 _spawn_nt(cmd, search_path, dry_run=dry_run)
39 else:

F:\Anaconda2\envs\py33\lib\distutils\spawn.py in _spawn_nt(cmd, search_path, verbose, dry_run)
80 raise DistutilsExecError(
---> 81 "command %r failed with exit status %d" % (cmd, rc))
82

DistutilsExecError: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2

During handling of the above exception, another exception occurred:

CompileError Traceback (most recent call last)
in ()
1 import pystan
----> 2 sm = pystan.StanModel(model_code=open('prophet_linear_growth.stan').read())

F:\Anaconda2\envs\py33\lib\site-packages\pystan\model.py in init(self, file, charset, model_name, model_code, stanc_ret, boost_lib, eigen_lib, verbose, obfuscate_model_name, extra_compile_args)
307
308 try:
--> 309 build_extension.run()
310 finally:
311 if redirect_stderr:

F:\Anaconda2\envs\py33\lib\distutils\command\build_ext.py in run(self)
337
338 # Now actually compile and link everything.
--> 339 self.build_extensions()
340
341 def check_extensions_list(self, extensions):

F:\Anaconda2\envs\py33\lib\distutils\command\build_ext.py in build_extensions(self)
446 self._build_extensions_parallel()
447 else:
--> 448 self._build_extensions_serial()
449
450 def _build_extensions_parallel(self):

F:\Anaconda2\envs\py33\lib\distutils\command\build_ext.py in _build_extensions_serial(self)
471 for ext in self.extensions:
472 with self._filter_build_errors(ext):
--> 473 self.build_extension(ext)
474
475 @contextlib.contextmanager

F:\Anaconda2\envs\py33\lib\distutils\command\build_ext.py in build_extension(self, ext)
531 debug=self.debug,
532 extra_postargs=extra_args,
--> 533 depends=ext.depends)
534
535 # XXX outdated variable, kept here in case third-part code

F:\Anaconda2\envs\py33\lib\distutils_msvccompiler.py in compile(self, sources, output_dir, macros, include_dirs, debug, extra_preargs, extra_postargs, depends)
382 self.spawn(args)
383 except DistutilsExecError as msg:
--> 384 raise CompileError(msg)
385
386 return objects

CompileError: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2

I don't know the reason . could you help me fix this problem? thks a lot!

@Netherdrake

This comment has been minimized.

Copy link

@Netherdrake Netherdrake commented Feb 27, 2017

I had the same issue on Linux with Python 3.6.

Installing pystan manually fixed the issue (otherwise it would just hang forever).

~/GitHub % git clone https://github.com/facebookincubator/prophet
Cloning into 'prophet'...
remote: Counting objects: 358, done.
remote: Compressing objects: 100% (109/109), done.
remote: Total 358 (delta 46), reused 0 (delta 0), pack-reused 245
Receiving objects: 100% (358/358), 6.28 MiB | 3.87 MiB/s, done.
Resolving deltas: 100% (67/67), done.
~/GitHub % cd prophet/python/
~/G/p/python % pip install -e .
Obtaining file:///home/user/GitHub/prophet/python
^COperation cancelled by user
~/G/p/python % pip install pystan
Collecting pystan
  Downloading pystan-2.14.0.0-cp36-cp36m-manylinux1_x86_64.whl (62.2MB)
    100% |████████████████████████████████| 62.2MB 29kB/s 
Requirement already satisfied: numpy>=1.7 in /home/user/anaconda3/lib/python3.6/site-packages (from pystan)
Requirement already satisfied: Cython!=0.25.1,>=0.22 in /home/user/anaconda3/lib/python3.6/site-packages (from pystan)
Installing collected packages: pystan
Successfully installed pystan-2.14.0.0
~/G/p/python % pip install -e .
Obtaining file:///home/user/GitHub/prophet/python
Requirement already satisfied: matplotlib in /home/user/anaconda3/lib/python3.6/site-packages (from fbprophet==0.1.post1)
Requirement already satisfied: numpy in /home/user/anaconda3/lib/python3.6/site-packages (from fbprophet==0.1.post1)
Requirement already satisfied: pandas in /home/user/anaconda3/lib/python3.6/site-packages (from fbprophet==0.1.post1)
Requirement already satisfied: pystan>=2.8 in /home/user/anaconda3/lib/python3.6/site-packages (from fbprophet==0.1.post1)
Requirement already satisfied: six>=1.10 in /home/user/anaconda3/lib/python3.6/site-packages (from matplotlib->fbprophet==0.1.post1)
Requirement already satisfied: python-dateutil in /home/user/anaconda3/lib/python3.6/site-packages (from matplotlib->fbprophet==0.1.post1)
Requirement already satisfied: pytz in /home/user/anaconda3/lib/python3.6/site-packages (from matplotlib->fbprophet==0.1.post1)
Requirement already satisfied: cycler>=0.10 in /home/user/anaconda3/lib/python3.6/site-packages (from matplotlib->fbprophet==0.1.post1)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=1.5.6 in /home/user/anaconda3/lib/python3.6/site-packages (from matplotlib->fbprophet==0.1.post1)
Requirement already satisfied: Cython!=0.25.1,>=0.22 in /home/user/anaconda3/lib/python3.6/site-packages (from pystan>=2.8->fbprophet==0.1.post1)
Installing collected packages: fbprophet
  Running setup.py develop for fbprophet
Successfully installed fbprophet
~/G/p/python % 
@jbargayo

This comment has been minimized.

Copy link

@jbargayo jbargayo commented Feb 27, 2017

I'm also having issues with installing pystan on Windows 10, and therefore cannot get fbprophet running either.

With that said, on my mac OS 10.12.3, I was able to install both pystan and fbprophet using pip install, however I cannot get anaconda to recognize them and it says the modules do not exist. I also tried using anaconda/bin/pip install, to ensure pip installed them to the right directory, but it said they were both already installed. Any ideas?

Edit:
Like I assumed, I wasn't using user/anaconda/bin/pip install, but the pip install on root. I have now got it working on my mac. Still not working on Windows 10.

@bletham

This comment has been minimized.

Copy link
Contributor

@bletham bletham commented Feb 28, 2017

@wangyifan1004 if

import pystan
sm = pystan.StanModel(model_code=open('prophet_linear_growth.stan').read())

is failing then I think the issue must be with pystan for Windows, since this same command works in pystan for Linux/OSX. The next step for fixing this I think should be to strip our stan model down to isolate which component is making it fail in Windows, and then ask the pystan team for help. I don't have access to a windows machine at the moment so any help here would be great, otherwise I'll try to get to this soon.

@176coding

This comment has been minimized.

Copy link

@176coding 176coding commented Feb 28, 2017

hi @seanjtaylor, I also have this kind of prob, and I have installed pystan and run the pystan demo code successfully, here is the screenshot

qq 20170301004802

but when I run 'pip install fbprophet' or download fbprophet zip file then run 'python setup.py install', I failed, here is the screenshot,
qq 20170301005154

and I am using win10+anaconda+python3.6
thank you in advance.

@rjtavares

This comment has been minimized.

Copy link

@rjtavares rjtavares commented Feb 28, 2017

@bletham I also ran the pystan demo code with no errors but can't pip install fbprophet. I'm on Windows 10.

As you've suggested, I tried to change the prophet_linear_growth model, and I get no errors when I remove the formulas from the line: y ~ normal((k + A * delta) .* t + (m + A * gamma) + X * beta, sigma_obs);

So y ~ normal(delta, sigma_obs); works, y ~ normal(beta, sigma_obs); works, etc... For some reason, y ~ normal(k+m, sigma_obs); also works, but that's the only formula I got to run successfully.

I hope this helps.

@xiemeilong

This comment has been minimized.

Copy link

@xiemeilong xiemeilong commented Mar 1, 2017

I also can not use 'pip install fbprophet' to install prophet on windows 10 with python 2.7.0 of Anaconda2-4.3.0.1-Windows-x86_64.

Collecting fbprophet
  Downloading fbprophet-0.1.post1.tar.gz
    Complete output from command python setup.py egg_info:
    no previously-included directories found matching 'doc\_build'
    warning: no previously-included files matching '*.so' found anywhere in distribution
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '.git*' found anywhere in distribution
    warning: no previously-included files matching '*.png' found anywhere in distribution
    no previously-included directories found matching 'pystan\stan\make'
    no previously-included directories found matching 'pystan\stan\src\docs'
    no previously-included directories found matching 'pystan\stan\src\doxygen'
    no previously-included directories found matching 'pystan\stan\src\python'
    no previously-included directories found matching 'pystan\stan\src\test'
    no previously-included directories found matching 'pystan\stan\lib\stan_math\doxygen'
    no previously-included directories found matching 'pystan\stan\lib\stan_math\make'
    no previously-included directories found matching 'pystan\stan\lib\stan_math\test'
    no previously-included directories found matching 'pystan\stan\lib\stan_math\lib\cpplint_4.45'
    no previously-included directories found matching 'pystan\stan\lib\stan_math\lib\gtest_1.7.0'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\users\xiemei~1\appdata\local\temp\pip-build-smdjae\fbprophet\setup.py", line 96, in <module>
        """
      File "D:\Anaconda2\lib\distutils\core.py", line 111, in setup
        _setup_distribution = dist = klass(attrs)
      File "D:\Anaconda2\lib\site-packages\setuptools-27.2.0-py2.7.egg\setuptools\dist.py", line 315, in __init__
      File "D:\Anaconda2\lib\site-packages\setuptools-27.2.0-py2.7.egg\setuptools\dist.py", line 361, in fetch_build_eggs
      File "D:\Anaconda2\lib\site-packages\setuptools-27.2.0-py2.7.egg\pkg_resources\__init__.py", line 851, in resolve
      File "D:\Anaconda2\lib\site-packages\setuptools-27.2.0-py2.7.egg\pkg_resources\__init__.py", line 1123, in best_match
      File "D:\Anaconda2\lib\site-packages\setuptools-27.2.0-py2.7.egg\pkg_resources\__init__.py", line 1135, in obtain
      File "D:\Anaconda2\lib\site-packages\setuptools-27.2.0-py2.7.egg\setuptools\dist.py", line 428, in fetch_build_egg
      File "D:\Anaconda2\lib\site-packages\setuptools-27.2.0-py2.7.egg\setuptools\command\easy_install.py", line 664, in easy_install
      File "D:\Anaconda2\lib\site-packages\setuptools-27.2.0-py2.7.egg\setuptools\command\easy_install.py", line 694, in install_item
      File "D:\Anaconda2\lib\site-packages\setuptools-27.2.0-py2.7.egg\setuptools\command\easy_install.py", line 875, in install_eggs
      File "D:\Anaconda2\lib\site-packages\setuptools-27.2.0-py2.7.egg\setuptools\command\easy_install.py", line 1114, in build_and_install
      File "D:\Anaconda2\lib\site-packages\setuptools-27.2.0-py2.7.egg\setuptools\command\easy_install.py", line 1102, in run_setup
    distutils.errors.DistutilsError: Setup script exited with error: SandboxViolation: open('build\\lib.win-amd64-2.7\\pystan\\stan\\lib\\stan_math_2.14.0\\doc\\api\\html\\d0\\d0f\\structstan_1_1is__vector__like_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4-members.html', 'wb') {}

    The package setup script has attempted to modify files on your system
    that are not within the EasyInstall build area, and has been aborted.

    This package cannot be safely installed by EasyInstall, and may not
    support alternate installation locations even if you run its setup
    script by hand.  Please inform the package's author and the EasyInstall
    maintainers to find out if a fix or workaround is available.

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\xiemei~1\appdata\local\temp\pip-build-smdjae\fbprophet\
@bletham

This comment has been minimized.

Copy link
Contributor

@bletham bletham commented Mar 1, 2017

@rjtavares thanks for your help. Can you check if this code runs?

>>> import pystan
>>> model_code = """
data {
  int n;                                
  int m;                                
  matrix[n, m] A;
  vector[n] y;
}

parameters {
  vector[m] delta;
}

model {y ~ normal(A * delta,1);}
"""
>>> model = pystan.StanModel(model_code=model_code)
@sflicht

This comment has been minimized.

Copy link

@sflicht sflicht commented Mar 1, 2017

@bletham I'm also having trouble geting fbprophet to install (linux, python 2.7), and the code you just posted does NOT run correctly for me. It raises a CompileError with an unhelpful message (just says gcc failed with exit code 1). Is this a pystan bug? I'm using pystan 2.14.0.0.

Note that I am on linux, so I don't think this is a Windows-specific problem.

@ruimgoncalves

This comment has been minimized.

Copy link

@ruimgoncalves ruimgoncalves commented Mar 1, 2017

I also am facing this problem Win10+Anaconda 3.6+VS2015 but in an virtualenv with python 3.5

    pip:            9.0.1-py35_1
    python:         3.5.3-0
    setuptools:     27.2.0-py35_1
    vs2015_runtime: 14.0.25123-0
    wheel:          0.29.0-py35_0

Here is the full dump

@rjtavares

This comment has been minimized.

Copy link

@rjtavares rjtavares commented Mar 1, 2017

@bletham I get an error with that model. Again, with y ~ normal(delta,1), the model compiles fine.

I don't think the error msg helps, but the console output may help. These are the last lines before it throws the exception:

C:\Users\_\Anaconda3\lib\site-packages\pystan\stan\src\stan/variational/advi.hpp(403): note: see reference to function template instantiation 'double stan::variational::advi<Model,stan::variational::normal_meanfield,RNG_t>::calc_ELBO(const Q &,stan::interface_callbacks::writer::base_writer &) const' being compiled
        with
        [
            Model=anon_model_3b30fd09063e3f75d25ac608ea03998b_namespace::anon_model_3b30fd09063e3f75d25ac608ea03998b,
            RNG_t=boost::random::ecuyer1988,
            Q=stan::variational::normal_meanfield
        ]
c:\users\_\appdata\local\temp\tmp_ieee5xz\anon_model_3b30fd09063e3f75d25ac608ea03998b.hpp(197): error C2784: 'void stan::math::accumulator<double>::add(const std::vector<S,std::allocator<_Other>> &)': could not deduce template argument for 'const std::vector<S,std::allocator<_Other>> &' from 'stan::math::var'
C:\Users\_\Anaconda3\lib\site-packages\pystan\stan\lib\stan_math_2.14.0\stan/math/prim/mat/fun/accumulator.hpp(103): note: see declaration of 'stan::math::accumulator<double>::add'
c:\users\_\appdata\local\temp\tmp_ieee5xz\anon_model_3b30fd09063e3f75d25ac608ea03998b.hpp(197): error C2784: 'void stan::math::accumulator<double>::add(const Eigen::Matrix<S,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> &)': could not deduce template argument for 'const Eigen::Matrix<S,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> &' from 'stan::math::var'
C:\Users\_\Anaconda3\lib\site-packages\pystan\stan\lib\stan_math_2.14.0\stan/math/prim/mat/fun/accumulator.hpp(88): note: see declaration of 'stan::math::accumulator<double>::add'
c:\users\_\appdata\local\temp\tmp_ieee5xz\anon_model_3b30fd09063e3f75d25ac608ea03998b.hpp(197): error C2893: Failed to specialize function template 'boost::disable_if<boost::is_arithmetic<S>,boost::enable_if<boost::is_same<S,T>,void>::type>::type stan::math::accumulator<T>::add(const S &)'
        with
        [
            T=double
        ]
c:\users\_\appdata\local\temp\tmp_ieee5xz\anon_model_3b30fd09063e3f75d25ac608ea03998b.hpp(197): note: With the following template arguments:
c:\users\_\appdata\local\temp\tmp_ieee5xz\anon_model_3b30fd09063e3f75d25ac608ea03998b.hpp(197): note: 'S=stan::math::var'
c:\users\_\appdata\local\temp\tmp_ieee5xz\anon_model_3b30fd09063e3f75d25ac608ea03998b.hpp(197): error C2893: Failed to specialize function template 'boost::enable_if<boost::is_arithmetic<S>,void>::type stan::math::accumulator<double>::add(S)'
c:\users\_\appdata\local\temp\tmp_ieee5xz\anon_model_3b30fd09063e3f75d25ac608ea03998b.hpp(197): note: With the following template arguments:
c:\users\_\appdata\local\temp\tmp_ieee5xz\anon_model_3b30fd09063e3f75d25ac608ea03998b.hpp(197): note: 'S=stan::math::var'

It stops here every time.

@seanjtaylor seanjtaylor added the py label Mar 2, 2017
@bletham

This comment has been minimized.

Copy link
Contributor

@bletham bletham commented Mar 2, 2017

Great, the issue seems to be that pystan in Windows will not compile models with matrix multiplication. @rjtavares would you be willing to post an issue with pystan (https://github.com/stan-dev/pystan) where you could include include the minimal failing example from above along with the full traceback? Hopefully it's something they can fix.

@monkeydust

This comment has been minimized.

Copy link

@monkeydust monkeydust commented Mar 2, 2017

Similar issue in R. Any help appreciated.

Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! bash.exe: warning: could not find /tmp, please create!
/usr/bin/sh: C:/Users/Rav/ANACON1/R/../Library/mingw-w64/bin/g++: No such file or directory
make: *** [file229841b71210.o] Error 127
Warning message:
running command 'make -f "C:/Users/Rav/ANACON
1/R/etc/x64/Makeconf" -f "C:/Users/Rav/ANACON1/R/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="file229841b71210.dll" WIN=64 TCLBIN=64 OBJECTS="file229841b71210.o"' had status 2
In addition: Warning message:
running command 'C:/Users/Rav/ANACON
1/R/bin/x64/R CMD SHLIB file229841b71210.cpp 2> file229841b71210.cpp.err.txt' had status 1

@bletham

This comment has been minimized.

Copy link
Contributor

@bletham bletham commented Mar 2, 2017

@monkeydust in R the source of the issue would be different than here. Check that rstan is working:

library(rstan)
model_code = 'parameters {real y;} model {y ~ normal(0,1);}'
fit <- stan(model_code=model_code)  # this will take a minute
mean(extract(fit)$y)  # should be close to 0

and if that runs without errors but Prophet isn't working, go ahead and open a new issue so we can debug there. (If rstan errors above, try re-installing RTools).

@monkeydust

This comment has been minimized.

Copy link

@monkeydust monkeydust commented Mar 2, 2017

Hi bletham - I reinstalled RTools, resarted machine, ran Rstudio and did what you suggested. I get errors - so rstan isnt working - trace here ( http://pastebin.com/dhNP2cNr ) - if you can quickly see whats wrong would appreciate your help. Rav

@bletham

This comment has been minimized.

Copy link
Contributor

@bletham bletham commented Mar 2, 2017

@monkeydust It seems that it can't find the c++ compiler; the rstan instructions here have some tips on what to check, in particular make sure you check the box to edit the system path while installing Rtools: https://github.com/stan-dev/rstan/wiki/Installing-RStan-on-Windows#toolchain

@bilalmahmood1

This comment has been minimized.

Copy link

@bilalmahmood1 bilalmahmood1 commented Mar 5, 2017

Hey bletham,
When I try your suggestion:

import pystan
model_code = """
data {
int n;
int m;
matrix[n, m] A;
vector[n] y;
}

parameters {
vector[m] delta;
}

model {y ~ normal(A * delta,1);}
"""

model = pystan.StanModel(model_code=model_code)

I get the following error:
distutils.errors.CompileError: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2

Can you please suggest what I should do to make pip install fbprophet to work.
Thanks

@bletham

This comment has been minimized.

Copy link
Contributor

@bletham bletham commented Mar 6, 2017

There seem to be two separate issues.

(1) Sometimes the PyStan installation is failing. @ritviksahajpal reported that pip install pystan did not work, but installing from source did. You should use the following code to check if PyStan is working:

import pystan
model_code = 'parameters {real y;} model {y ~ normal(0,1);}'
model = pystan.StanModel(model_code=model_code)  # this will take a minute
y = model.sampling(n_jobs=1).extract()['y']
y.mean()  # should be close to 0

If pip install pystan doesn't work, then I'd suggest opening an issue with PyStan so they can be aware of the issue and possibly find a solution (https://github.com/stan-dev/pystan/issues).

(2) Once you do have a functioning PyStan installation, Prophet will not install. The issue here seems to be that PyStan in windows does not support matrix multiplication. @rjtavares reports that the following test case errors even with a functioning PyStan install:

import pystan
model_code = """
data {
  int n;                                
  int m;                                
  matrix[n, m] A;
  vector[n] y;
}

parameters {
  vector[m] delta;
}

model {y ~ normal(A * delta,1);}
"""
model = pystan.StanModel(model_code=model_code)

If this is the issue, then it is an upstream issue with PyStan-in-Windows and Prophet will not work until it is fixed. An issue needs to be raised with PyStan (https://github.com/stan-dev/pystan/issues). I do not currently have access to a Windows machine to run these test cases myself, and so can't open the issue myself. If someone who has the code in (1) functioning but (2) not is willing to open an issue with PyStan that would be extremely helpful.

@agiani99

This comment has been minimized.

Copy link

@agiani99 agiani99 commented Mar 8, 2017

@bletham Hi, thanks forall support.
I suspect that issue #2 and #85 could be merged, eventually. I managed to have pystan running on W10 with conda (python3.6): your code 1) is working while code 2) with matrix operation does not. I cannot pip install fbprophet in this situation,too.

PS Error got is however on cl.exe from VS14 in my case.

@rmax

This comment has been minimized.

Copy link
Contributor

@rmax rmax commented Mar 8, 2017

@agiani99 here is a potential fix #96

Could you try installing from this source? https://github.com/rolando-contrib/prophet/archive/windows-stan-compat.zip Update: changes merged, use latest git version

@agiani99

This comment has been minimized.

Copy link

@agiani99 agiani99 commented Mar 8, 2017

@rolando
Thx Rolando. I have already installed fbprophet in R. Rstan works. I have only problem in installing fbprophet in python 3.6 (conda). I will try to look into #96

@bletham

This comment has been minimized.

Copy link
Contributor

@bletham bletham commented Mar 9, 2017

A huge thanks to @rolando who fixed this in #96. Please install the latest version from github and see if it is working for you or if you have any additional issues.

@dobbmeep

This comment has been minimized.

Copy link

@dobbmeep dobbmeep commented Mar 9, 2017

Excellent, works fine for me now. Thank you very much!

@monkeydust

This comment has been minimized.

Copy link

@monkeydust monkeydust commented Mar 9, 2017

still struggling to get this installed on windows, step-by-step instructions would be appreciated if this finally works. thanks

@rmax

This comment has been minimized.

Copy link
Contributor

@rmax rmax commented Mar 10, 2017

@monkeydust try this:

@agiani99

This comment has been minimized.

Copy link

@agiani99 agiani99 commented Mar 10, 2017

@monkeydust

This comment has been minimized.

Copy link

@monkeydust monkeydust commented Mar 10, 2017

@rolando thanks. I did that but get this error on Pystan. Any idea?

C:\Users>pip install pystan
Collecting pystan
Using cached pystan-2.14.0.0.tar.gz
Requirement already satisfied: Cython!=0.25.1,>=0.22 in c:\users\rav\miniconda3\lib\site-packages (from pystan)
Requirement already satisfied: numpy>=1.7 in c:\users\rav\miniconda3\lib\site-packages (from pystan)
Building wheels for collected packages: pystan
Running setup.py bdist_wheel for pystan ... error
Complete output from command C:\Users\Rav\Miniconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\Rav\AppData\Local\Temp\pip-build-b2ikcydb\pystan\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d C:\Users\Rav\AppData\Local\Temp\tmpz_ufxr24pip-wheel- --python-tag cp36:
Compiling pystan/api.pyx because it depends on C:\Users\Rav\Miniconda3\lib\site-packages\Cython\Includes\libcpp_init.pxd.
Compiling pystan/_chains.pyx because it depends on C:\Users\Rav\Miniconda3\lib\site-packages\Cython\Includes\libcpp\vector.pxd.
[1/2] Cythonizing pystan/_chains.pyx
[2/2] Cythonizing pystan/_api.pyx
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\pystan
copying pystan\api.py -> build\lib.win-amd64-3.6\pystan
copying pystan\chains.py -> build\lib.win-amd64-3.6\pystan
copying pystan\constants.py -> build\lib.win-amd64-3.6\pystan
copying pystan\misc.py -> build\lib.win-amd64-3.6\pystan
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\dir_148120812de7344119b120632cfcec74.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\dir_1dcd98e7c4f45b41e0c83c911c6e550e.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html

...

copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\dir_20b155cb57d7a56b3d8d0cc440c20c67.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\dir_218f7c98404744c2444933b45636fd56.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\functions_vars_p.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\functions_vars_r.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\functions_vars_s.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\functions_vars_t.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\functions_vars_v.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\functions_vars_x.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\functions_vars_y.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\functions_w.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\functions_x.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\functions_y.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\globals.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\globals_defs.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\globals_vars.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\hierarchy.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\index.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\jquery.js -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\menu.js -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\menudata.js -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\modules.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\namespacemembers.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\namespacemembers_func.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\namespacemembers_type.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\namespacemembers_vars.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\namespaces.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\tabs.css -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html
creating build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html\d0
creating build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html\d0\d00
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\d0\d00\structstan_1_1math_1_1store__type_3_01int_01_4-members.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html\d0\d00
creating build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html\d0\d02
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\d0\d02\rev_2core_2operator__greater__than__or__equal_8hpp.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html\d0\d02
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\d0\d02\rev_2core_2operator__greater__than__or__equal_8hpp_source.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html\d0\d02
creating build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html\d0\d05
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\d0\d05\classstan_1_1math_1_1op__vector__vari.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html\d0\d05
creating build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html\d0\d06
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\d0\d06\vvd__vari_8hpp.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html\d0\d06
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\d0\d06\vvd__vari_8hpp_source.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html\d0\d06
creating build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html\d0\d0d
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\d0\d0d\structstan_1_1math_1_1sinh__fun-members.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html\d0\d0d
creating build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html\d0\d0f
copying pystan\stan\lib\stan_math_2.14.0\doc\api\html\d0\d0f\structstan_1_1is__vector__like_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4-members.html -> build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html\d0\d0f
error: could not create 'build\lib.win-amd64-3.6\pystan\stan\lib\stan_math_2.14.0\doc\api\html\d0\d0f\structstan_1_1is__vector__like_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4-members.html': No such file or directory

----------------------------------------

Command "C:\Users\Rav\Miniconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\Rav\AppData\Local\Temp\pip-build-b2ikcydb\pystan\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\Rav\AppData\Local\Temp\pip-k994v6n5-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Rav\AppData\Local\Temp\pip-build-b2ikcydb\pystan\

@rmax

This comment has been minimized.

Copy link
Contributor

@rmax rmax commented Mar 10, 2017

@monkeydust oh, you are using python 3.6 and there are no windows pystan's wheels for that version: https://pypi.org/project/pystan/#files

However, conda-forge recently released win packages for pystan. Try: conda install -c conda-forge pystan

@vincentyzzh

This comment has been minimized.

Copy link

@vincentyzzh vincentyzzh commented Mar 11, 2017

@rolando I followed your instructions:

Follow this instructions to install pystan: https://pystan.readthedocs.io/en/latest/windows.html
Download the latest development version: https://github.com/facebookincubator/prophet/archive/master.zip
Run python setup.py install inside the python directory.

and I got this error:
runfile('C:/Users/vince/Desktop/Individual Research Project/prophet-master/prophet-master/python/setup.py', wdir='C:/Users/vince/Desktop/Individual Research Project/prophet-master/prophet-master/python')
C:\Apps\Anaconda\lib\site-packages\IPython\core\interactiveshell.py:2889: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D.
warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)
An exception has occurred, use %tb to see the full traceback.

SystemExit: usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help

error: no commands supplied

Do you have any idea about this? I'm using win10 and Python 3.5.2 |Anaconda 4.3.1 (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)]. Thank you!

@rmax

This comment has been minimized.

Copy link
Contributor

@rmax rmax commented Mar 12, 2017

@vincentyzzh It's odd that it mentions IPython there. How are you running the command? You should write either python setup.py install or pip install . in the command console.

Just in case, when you install pystan it should install as well Cython, if not make sure to run either conda install cython or pip install cython before installing fbprophet from the github source.

@vincentyzzh

This comment has been minimized.

Copy link

@vincentyzzh vincentyzzh commented Mar 12, 2017

@rolando thanks for your reply.
I'm using spyder to run the setup.py file. I realised that I was using the Ipython console to run the file, I guess that's why it went wrong. Now I switched it to python console and re-run the setup.py, it shows this:

Python 3.5.2 |Anaconda 4.3.1 (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "l
runfile('C:/Users/vince/Desktop/Individual Research Project/prophet-master/prophet-master/python/setup.py', wdir='C:/Users/vince/Desktop/Individual Research Project/prophet-master/prophet-master/python')
it just get stuck here for a very long time with no responds, so I tried to import fbprophet and I got this:
import fbprophet
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help

error: no commands supplied
Do you know what should I do?

@tommybutler

This comment has been minimized.

Copy link

@tommybutler tommybutler commented Mar 13, 2017

If folks are willing to consider using Prophet on windows under cygwin (my preference), as long as the underlying pystan issues are fixed, prophet installs and works fine.

The underlying pystan issues are outlined here --> #92

I patched my own pystan installation to fix the problems it causes, but I think its maintainers should be the ones to decide on how to fix their problems with windows, because they could have security implications. See above link for details.

@bletham

This comment has been minimized.

Copy link
Contributor

@bletham bletham commented Apr 19, 2017

This should now be fixed in the pip version (0.1.1). Can someone try to install from pip in Windows and see if it works?

@tyokota

This comment has been minimized.

Copy link

@tyokota tyokota commented Apr 21, 2017

@bletham: I was able to use pip to install fbprophet on Windows with Anaconda Python 3.6.

  • Checked pip was the latest version: python -m pip install -U pip
  • Installed pystan via conda-forge: conda install -c conda-forge pystan
  • Installed fbprohet via pip: pip install fbprophet
@rmax

This comment has been minimized.

Copy link
Contributor

@rmax rmax commented Apr 21, 2017

FYI, latest release is available via conda too: conda install -c conda-forge fbprophet

@bletham

This comment has been minimized.

Copy link
Contributor

@bletham bletham commented Apr 21, 2017

Great, thanks @tyokota . And thanks again to @rolando for actually fixing the issue!

I'm going to close this issue, any further install issues in Windows will have a different cause so we'll handle them in a new issue.

@Alvaron06

This comment has been minimized.

Copy link

@Alvaron06 Alvaron06 commented Jan 20, 2018

I am also facing the same Issue. I have installed pystan and Facebook prophet but still jupiter doesn't recognize it.

@bletham

This comment has been minimized.

Copy link
Contributor

@bletham bletham commented Jan 23, 2018

Could you try these steps to install both from conda-forge?

conda install -c conda-forge pystan
conda install -c conda-forge fbprophet
@chervov

This comment has been minimized.

Copy link

@chervov chervov commented Jul 22, 2018

I have trouble installing fbprophet on windows.
pip install fbprophet
generates error:
io.h: No such file or directory

See details at:
https://stackoverflow.com/questions/51463548/pip-install-fbprophet-error-io-h-no-such-file-or-directory-error-command

After some modifcations now I am getting another error:
" ImportError: cannot import name 'StanModel' "

If I am trying to use "conda install"
I get:

Executing transaction: failed
ERROR conda.core.link:_execute(502): An error occurred while installing package
'conda-forge::pystan-2.17.1.0-py36_vc14_0'.
PermissionError(13, 'Permission denied')
Attempting to roll back.

Rolling back transaction: done

PermissionError(13, 'Permission denied')

@bletham

This comment has been minimized.

Copy link
Contributor

@bletham bletham commented Jul 23, 2018

The issue here is that pystan is not installing correctly.

Could you try conda clean --all followed by conda update pystan?

See also https://stackoverflow.com/questions/49181799/conda-update-conda-permission-error which might have some things to try for this PermissionError, which I'm not sure the source of.

Ultimately you can check that pystan is working by running

import pystan
model_code = 'parameters {real y;} model {y ~ normal(0,1);}'
model = pystan.StanModel(model_code=model_code)  # this will take a minute
y = model.sampling(n_jobs=1).extract()['y']
y.mean()  # should be close to 0

Once that runs without error, fbprophet should install fine.

@siehienp20

This comment has been minimized.

Copy link

@siehienp20 siehienp20 commented Nov 27, 2019

Wow same issue still present nearly 3 years later. fbprophet will not install whether pystan is installed correctly or not. i can import pystan and run a simple model, but fbprophet will not go through even when manual installed

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

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.