7

I am trying pip install fbprophet. I am getting that error: "Microsoft Visual C++ 14.0 is required" It has been discussed many times (e.g. Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat) ) , but seems no answer helps me.

My environment:

Windows 7

Anaconda - just installed

Mirosoft VC 2017 - just installed ( It is not version 14, but it is newer - it seems impossible to load 14 (2015) version from MS site )

MS VC Build Tools - also just installed

computer has been relauched after installations

Alexander Chervov
  • 616
  • 3
  • 7
  • 23
  • 1
    https://stackoverflow.com/a/50671800/7976758 – phd Jul 21 '18 at 23:08
  • https://wiki.python.org/moin/WindowsCompilers – phd Jul 21 '18 at 23:09
  • Related: https://stackoverflow.com/questions/50963194/installing-fbprophet-on-python – Alexander Chervov Jul 22 '18 at 06:21
  • @phd Indeed https://stackoverflow.com/questions/49610212/pip-error-even-microsoft-visual-c-14-0-is-installed/50671800#50671800 makes sense ! The error: "Microsoft Visual C++ 14.0 is required..." disappears but appears the new one: https://stackoverflow.com/questions/51463548/pip-install-fbprophet-error-io-h-no-such-file-or-directory-error-command – Alexander Chervov Jul 22 '18 at 09:19
  • Maybe this can help you https://stackoverflow.com/questions/29846087/microsoft-visual-c-14-0-is-required-unable-to-find-vcvarsall-bat/55575792#55575792 – Alejandro Alcalde Apr 08 '19 at 15:25

4 Answers4

11

I had the same problem but I solved using these instructions: https://facebook.github.io/prophet/docs/installation.html

From that page, you can go to the installation instructions for PyStan (which is needed) in which is specified how to install a C++ compiler for the libraries.

tl;dr -> conda install libpython m2w64-toolchain -c msys2

It does not install MS compiler, but it worked on my case and I had also errors regarding the compiler (also had VS2017 installed). I run Windows 10 and latest Anaconda distribution. I hope it helps.

VictorHMartin
  • 325
  • 5
  • 20
  • Hello Victor, I got as far as installing PyStan using the conda install libpython m2w64-toolchain -c msys2 as you show above. pystan loads in ipython. However, fbprophet install fails – Bharat Nov 06 '18 at 19:40
  • could you please write here the error it gives you during installation? I will take a look as soon as I can. – VictorHMartin Nov 07 '18 at 21:21
  • @Bharat I discovered recently that using conda-forge channel for installing this is the option that works. So I would suggest you to try doing ```conda config --add channels conda-forge``` and then installing pystan and other dependencies also using conda-forge as ```conda install pystan -c conda-forge```. Finally, install also fbprophet with ```conda install -c conda-forge fbprophet```. Let me know if it worked for you. – VictorHMartin Jan 20 '19 at 14:57
4

I could not solve it in the latest version of Anaconda which is 5.3.0. Upon extensive googling, I found a thread on github that advised me to go back to the previous version of Anaconda which is 5.2.0.

With that, it worked fine.

Thanks for taking time to look into it though.

Bharat
  • 2,409
  • 6
  • 32
  • 57
4

VictorHMartin's answer (and following the details from the links provided) worked perfectly fine for me as long as I tried using them with Python 3.7. However, I needed to get them working with Python 3.9, where the last two conda commands failed and I had to use pip instead; here's the list of commands that worked for me:

  • conda create -n venv (replace venv name as you like)
  • activate venv
  • conda install libpython m2w64-toolchain -c msys2
  • conda install numpy pandas cython -c conda-forge
  • conda install matplotlib scipy plotly -c conda-forge (fbprophet optionally needs plotly for interactive plots)
  • pip install pystan (conda install pystan -c conda-forge failed here for P3.9)
  • pip install fbprophet (conda install fbprophet -c conda-forge failed here for P3.9)
Dharman
  • 30,962
  • 25
  • 85
  • 135
ezadeh
  • 61
  • 4
0

I add -c conda-forge and seems succeeded.

try this:

conda install -c conda-forge fbprophet
theletz
  • 1,713
  • 2
  • 16
  • 22
Alex Fang
  • 79
  • 3