xgboost: pip install failure

root@0c6c17725a7b:/# pip install xgboost Downloading/unpacking xgboost Could not find a version that satisfies the requirement xgboost (from versions: 0.4a12, 0.4a13) Cleaning up… No distributions matching the version for xgboost Storing debug log for failure in /root/.pip/pip.log

You can repeat in docker with: docker run -it --rm ubuntu:trusty

apt-get update
apt-get install python-pip
pip install xgboost

see this also:

http://stackoverflow.com/questions/32258463/install-xgboost-under-python-failing

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 72 (24 by maintainers)

Commits related to this issue

Most upvoted comments

I had to build it from scratch:

git clone --recursive https://github.com/dmlc/xgboost.git  
cd xgboost  
./build.sh
pip install -e python-package  

For me worked on MacOS Sierra after: brew install gcc --without-multilib

executing this commands:

export CC=gcc-7
export CXX=g++-7

@smargsongithub @phunterlau Thank you for replies! apt-get install g++ also didn’t work for me, but I succeed with manual installation as described here https://www.kaggle.com/c/springleaf-marketing-response/forums/t/16320/cloud-vs-local-machine-pros-and-cons I had some issues beacause I’m using Anaconda, so my final recipe is

sudo apt-get install make sudo apt-get update sudo apt-get install gcc sudo apt-get install g++ sudo apt-get install git sudo git clone https://github.com/dmlc/xgboost cd xgboost sudo ./build.sh cd python-package sudo /home/username/anaconda/bin/python setup.py install

what worked for me was adding the following on linux … credit (everyone above)

git clone --recursive https://github.com/dmlc/xgboost.git  
cd xgboost  
./build.sh
pip install -e python-package 
cd python-package
python setup.py install

please try reinstalling clang-omp by brew remove clang-omp; brew install clang-omp; only change these two lines (no ADD_FLAG) in config.mk, and make sure to copy it to the same directory as Makefile is.

export CC = clang-omp
export CXX = clang-omp++

and run make

Try to install Xgboost with git clone on MAC. I follow all instruction from @LiyanJin until this answer, I downloaded clang-omp via homebrew to use multi-threading.

  • config.mk :
export CC = clang-omp
export CXX = clang-omp++
export MPICXX = mpicxx
  • Error :
make
clang-omp++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude -fopenmp  -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
In file included from src/learner.cc:7:
In file included from include/xgboost/logging.h:11:
In file included from dmlc-core/include/dmlc/logging.h:10:
/usr/local/Cellar/clang-omp/2015-04-01/libexec/bin/../include/c++/v1/cstdio:100:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
         ^
1 error generated.
make: *** [build/learner.o] Error 1

pip install works well, but I would like to have the lastest features in python package.

Some tips ?


Edit : Find the solution. Just xcode-select --install and make. Hope it will help other.

The solution that I found worked for me was navigating to /home/username/anaconda3/lib/python3.5/site-packages/xgboost and running ./build-python.sh

I tried several times but lost hope to install xgboost on my windows OS PC, but now may be you will help what to do it is the error C:\Users\Sander>pip install xgboost Collecting xgboost Downloading xgboost-0.4a30.tar.gz (753kB) 100% |################################| 753kB 397kB/s No files/directories in c:\users\sander\appdata\local\temp\pip-build-gqsijf\xgbo ost\pip-egg-info (from PKG-INFO) I use anaconda python installation I remember in one of kaggle competition, somebody failed install xgboos and chooses another technique and he got 2 place…

On Thu, Jan 7, 2016 at 3:31 AM, dsivakumar notifications@github.com wrote:

@phunterlau https://github.com/phunterlau Thanks, that seems the only solution.

— Reply to this email directly or view it on GitHub https://github.com/dmlc/xgboost/issues/463#issuecomment-169595600.

@philipshurpik Thanks a ton!

@armgilles that is right: by default mac hasn’t install the compilers with headers while clang-omp needs the local installed Xcode, installing it by xcode-select --install everything after upgrade to a new system can solve the problem.

Hi everyone, To install Xgboost on Windows using Python follow the instructions in the following thread.

http://stackoverflow.com/questions/33749735/how-to-install-xgboost-package-in-python-windows-platform

Using Windows 7. Anaconda from yhat Rodeo.

Trying to install xgboost and getting the following error. Please help.

`! pip install xgboost

Collecting xgboost Using cached xgboost-0.4a30.tar.gz No files/directories in C:\Users\USER\AppData\Local\Temp\pip-build-dkmqc8n1\xgboost\pip-egg-info (from PKG-INFO)`