GithubHelp home page GithubHelp logo

Comments (32)

BruceBinBoxing avatar BruceBinBoxing commented on April 19, 2024 27

As @matse004 said, using pystan==2.17.1.0 rather than 2.18 works for me!
Do as bellow:

sudo pip uninstall pystan
sudo pip install pystan==2.17.1.0
sudo pip install fbprophet

from prophet.

Tafkas avatar Tafkas commented on April 19, 2024 25

The fbprophet package requires pystan, which requires Cython. Try installing Cython with

pip install Cython

This should fix the issue.

from prophet.

philipperemy avatar philipperemy commented on April 19, 2024 6

I had the same issue and I could make it work that way:

git clone --recursive https://github.com/stan-dev/pystan.git
cd pystan
python setup.py install
pip install fbprophet

from prophet.

hassheh avatar hassheh commented on April 19, 2024 6

I have the same issue. I have tried all the mentioned fixes including downgrading pystan from 2.18 to 2.17.1.0 but still, it gives this error.

error: command '/usr/bin/clang' failed with exit status 1

from prophet.

plank3ffect avatar plank3ffect commented on April 19, 2024 6

Actually, I just got it working. From the FB Prophet GitHub, they acknowledge that the pystan 3.0.0 version broke fbprophet (#1856). The team is currently working on a new version and should publish soon. In the meantime, i had to do a pip uninstall pystan to remove 3.0.0 and then install using pip install pystan~=2.14 to install an older version. It seems the newer pystan 3.0.0 calls their module stan instead of pystan, which was breaking a few things. There were probably more changes to the updated pystan rewrite.

from prophet.

matse004 avatar matse004 commented on April 19, 2024 5

Run into the same issue on MacOS ElCapitan (10.11.6). Nothing worked for me except for manually downgrading pystan package from 2.18 to 2.17.1.0.

from prophet.

jeroenjanssens avatar jeroenjanssens commented on April 19, 2024 4

I just want to chip in by saying that @anshul-tak's solution worked for me as well. Thanks for that, @anshul-tak.

For what it's worth, I use env CC=$(which gcc-9) CXX=$(which g++-9) pip install fbprophet which (no pun intended) is slightly more sustainable should the version of gcc change (currently it's at 9.2.0_3).

from prophet.

olivboom avatar olivboom commented on April 19, 2024 3

Installing via Conda fixed all problems for me

from prophet.

anshul-tak avatar anshul-tak commented on April 19, 2024 3

Another solution that worked for me is force pip to use homebrew GCC compiler instead of CLANG

  1. After installing homebrew
    env CXX=/usr/local/Cellar/gcc/9.2.0/bin/g++-9 CC=/usr/local/Cellar/gcc/9.2.0/bin/gcc-9 pip install fbprophet==0.4.post2
    or Add env variable in your bash rc file.

from prophet.

mahanh avatar mahanh commented on April 19, 2024 3

reinstalling pystan on macOS Big Sur didn't help me!
I properly installed fbprophet using pip after running the following:

sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install

from prophet.

exxcong avatar exxcong commented on April 19, 2024 3

Hey @gregwalla, I'm also on Big sure, 11.2.1 at this point. I tried normal pip install, conda install, nothing worked, until I followed the advice of @BruceBinBoxing and downgraded pystan. This worked. For a mac I don't think we need to sudo, but it also didn't hurt, I used it verbatum:

sudo pip uninstall pystan
sudo pip install pystan==2.17.1.0
sudo pip install fbprophet

Thanks a lot! I use mac M1 with Big Sur. I tried all kinds of methods and all failed. But I used your method and it succeed. Thanks!

from prophet.

seanyboi avatar seanyboi commented on April 19, 2024 2

I'm going to add my two cents, if any one is still having problems make sure you update your Xcode using:
xcode-select --install
This was my lifesaver along with making sure pystan is installed BEFORE you install fbprophet

from prophet.

GwenVCX avatar GwenVCX commented on April 19, 2024 2

My environment:
OSX : Big Sur 11.6
python : python:3.7-slim

$ pip install pystan==2.19
$ pip install fbprophet

from prophet.

espoirMur avatar espoirMur commented on April 19, 2024 1

xcode-select --install

reinstalling pystan on macOS Big Sur didn't help me!
I properly installed fbprophet using pip after running the following:

sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install

Thanks @mahanh this help to solve the issue on my side

from prophet.

amadalla avatar amadalla commented on April 19, 2024 1

Actually, I just got it working. From the FB Prophet GitHub, they acknowledge that the pystan 3.0.0 version broke fbprophet (#1856). The team is currently working on a new version and should publish soon. In the meantime, i had to do a pip uninstall pystan to remove 3.0.0 and then install using pip install pystan~=2.14 to install an older version. It seems the newer pystan 3.0.0 calls their module stan instead of pystan, which was breaking a few things. There were probably more changes to the updated pystan rewrite.

Thank you @plank3ffect! My error was 'unable to find module pystan', even though it was installed.
This helped fix the issue.

from prophet.

l0vest0rm avatar l0vest0rm commented on April 19, 2024

the problem exists when Cython already installed

from prophet.

seanjtaylor avatar seanjtaylor commented on April 19, 2024

This question suggests that maybe your XCode is outdated. Can you check cc --version. Here's mine:

sjt-mbp1:examples sjt$ cc --version
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

from prophet.

l0vest0rm avatar l0vest0rm commented on April 19, 2024

it is ok now when i installed the xcode,thanks to seanjtaylor

from prophet.

stories2 avatar stories2 commented on April 19, 2024

Failed install fbprophet.
sudo pip3.5 install fbprophet

It stocks in Downloading fbprophet-0.1.1.tar.gz

I already installed Xcode and Cython.

Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

from prophet.

thomzi12 avatar thomzi12 commented on April 19, 2024

FWIW I am encountering same issue as @stories2

My cc --version:

Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Update: installing via conda works for me

from prophet.

stories2 avatar stories2 commented on April 19, 2024

@thomzi12 In my case, it just took soooooooooooo long time.
Drink coffee. The time will solve your problem :)

from prophet.

jisumanbu avatar jisumanbu commented on April 19, 2024

Same issue I met when I install pystan (2.18.0.0) & fbprophet (0.3.post2) on macOS(10.13.6)
Issue disappeared after downgrading pystan from 2.18 to 2.17.1.0 as matse004's suggestion.

from prophet.

maddy2u avatar maddy2u commented on April 19, 2024

Installing via Conda fixed all problems for me

This is the only thing that worked for me in the whole thread.

from prophet.

buxizhizhoum avatar buxizhizhoum commented on April 19, 2024

export CC=$(which gcc)
export CXX=$(which g++)
pip install fbprophet
And my error is: error: command 'clang' failed with exit status 1
This works, thanks @anshul-tak

from prophet.

andreamoro avatar andreamoro commented on April 19, 2024

Hi, I have the same problems in installing Prophet. Irrespective of the two exports above, I still get the following error:

  Building wheel for fbprophet (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/andreamoro/.pyenv/versions/3.8.6/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c_/ll8fp86d39d2qthh_cbg8vlc0000gp/T/pip-install-dpr3g5ph/fbprophet/setup.py'"'"'; __file__='"'"'/private/var/folders/c_/ll8fp86d39d2qthh_cbg8vlc0000gp/T/pip-install-dpr3g5ph/fbprophet/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 /private/var/folders/c_/ll8fp86d39d2qthh_cbg8vlc0000gp/T/pip-wheel-jmh6cp00
       cwd: /private/var/folders/c_/ll8fp86d39d2qthh_cbg8vlc0000gp/T/pip-install-dpr3g5ph/fbprophet/
  Complete output (10 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib
  creating build/lib/fbprophet
  creating build/lib/fbprophet/stan_model
  Importing plotly failed. Interactive plots will not work.
  INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_dfdaf2b8ece8a02eb11f050ec701c0ec NOW.
  error: command '/usr/bin/gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for fbprophet
  Running setup.py clean for fbprophet
Failed to build fbprophet
Installing collected packages: fbprophet
    Running setup.py install for fbprophet ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/andreamoro/.pyenv/versions/3.8.6/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c_/ll8fp86d39d2qthh_cbg8vlc0000gp/T/pip-install-dpr3g5ph/fbprophet/setup.py'"'"'; __file__='"'"'/private/var/folders/c_/ll8fp86d39d2qthh_cbg8vlc0000gp/T/pip-install-dpr3g5ph/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 /private/var/folders/c_/ll8fp86d39d2qthh_cbg8vlc0000gp/T/pip-record-s04b7vvw/install-record.txt --single-version-externally-managed --compile --install-headers /Users/andreamoro/.pyenv/versions/3.8.6/include/python3.8/fbprophet
         cwd: /private/var/folders/c_/ll8fp86d39d2qthh_cbg8vlc0000gp/T/pip-install-dpr3g5ph/fbprophet/
    Complete output (10 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/fbprophet
    creating build/lib/fbprophet/stan_model
    Importing plotly failed. Interactive plots will not work.
    INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_dfdaf2b8ece8a02eb11f050ec701c0ec NOW.
    error: command '/usr/bin/gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/andreamoro/.pyenv/versions/3.8.6/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c_/ll8fp86d39d2qthh_cbg8vlc0000gp/T/pip-install-dpr3g5ph/fbprophet/setup.py'"'"'; __file__='"'"'/private/var/folders/c_/ll8fp86d39d2qthh_cbg8vlc0000gp/T/pip-install-dpr3g5ph/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 /private/var/folders/c_/ll8fp86d39d2qthh_cbg8vlc0000gp/T/pip-record-s04b7vvw/install-record.txt --single-version-externally-managed --compile --install-headers /Users/andreamoro/.pyenv/versions/3.8.6/include/python3.8/fbprophet Check the logs for full command output.

I'm not using Anaconda or anything like it, Xcode is installed.
As far as I can understand from the above, it seems the error code is due to some writing permission, which as a matter of fact are correct because on this working laptop IT prevents me to write into the private folder.

I had a look at the settings, but couldn't spot anything that allow me to specify a different folder.

Has anybody had a similar issue?

Thanks
Andrea

from prophet.

vemuri-nath avatar vemuri-nath commented on April 19, 2024

@andreamoro facing the same problem as you mentioned. Please update me if you find a solution
thanks

from prophet.

andreamoro avatar andreamoro commented on April 19, 2024

It might me a problem with pystan, which relies on C++ libraries that are not found where expected. I'm trying to speak with a developer there. Are you able to run pyStan and a demo example with success on your end @vemuri-nath ?

from prophet.

gregwalla avatar gregwalla commented on April 19, 2024

Same problem here , nothing seems to work. I am on MAC OS BIG SUR 11.1
Additional requirements :

  • I use a venv for 'light weight' reproductibilty.

from prophet.

erikabergman avatar erikabergman commented on April 19, 2024

Hey @gregwalla, I'm also on Big sure, 11.2.1 at this point. I tried normal pip install, conda install, nothing worked, until I followed the advice of @BruceBinBoxing and downgraded pystan. This worked. For a mac I don't think we need to sudo, but it also didn't hurt, I used it verbatum:

sudo pip uninstall pystan
sudo pip install pystan==2.17.1.0
sudo pip install fbprophet

from prophet.

plank3ffect avatar plank3ffect commented on April 19, 2024

Could it be that we are using pyenv and virtualenv? Mine fails as well because it cannot find pystan, which I definitely installed. It is executing from a /private/ folder.....

File "/private/var/folders/km/1jh10x6x4l11w3bmxqrbgtp40000gn/T/pip-install-ppew3k63/fbprophet_263d1ca7a61543b0bfe1544fa2f11904/fbprophet/models.py", line 209, in build_model import pystan ModuleNotFoundError: No module named 'pystan'

Any ideas on how to specify the pystan from the virtualenv when installing fbprophet? Or am I off base?

from prophet.

andreamoro avatar andreamoro commented on April 19, 2024

It seems this error still persists with pystan 3.2.0. Am I wrong?

I cannot install the library at all. Anybody else?

from prophet.

sarvesha-jaiswal avatar sarvesha-jaiswal commented on April 19, 2024

when i tried installing fbprophet I've got the same error?
anyone know how to install it ?

from prophet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.