2

I'm running Python 2.7 with anaconda distribution on a mac, when I try to install xgboost via pip, I see the following error:

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/zk/zh9sqr0n2n91v0smc5ypcz7w0000gn/T/pip-build-eh4_ag8h/xgboost/

I tried updating both pip and setuptools, which seem to both be up to date. The egg error persists!

Have any mac/ python 2 users run across this problem?

jamebone
  • 21
  • 1
  • 2

1 Answers1

0

There's a good discussion of this problem here. I found that Joe Nyland's answer worked perfectly for me (running brew install gcc@5 can take a long time though, so be prepared for that).

Here's his answer:

Success!

I found this here:

clang LLVM compiler on Mac OS X from Xcode doesn't support OpenMP multi-thread. An alternative choice is installing homebrew http://brew.sh/ and brew install g++-5 which provides multi-thread OpenMP support. Bearing that in mind, I tried this and it allows me to install from pip!

$ brew install gcc@5

$ pip install xgboost

I have no idea why this works but brew install gcc --without-multilib didn't.

I can't help but think other users will fall into this trap and waste time trying to work out what is actually going wrong. Hopefully this workaround works for them but I'd prefer to see a more reliable installation routine from the pip package

Paul Meinshausen
  • 779
  • 1
  • 8
  • 13