2016-10-12 4 views
3

xgboost를 컴파일하는 중 오류가 발생했습니다. 나는 물건을 더 어렵게 만드는 sudo 액세스 권한이 없습니다. 당신은 충분한 라이브러리를 기반으로 (선택하십시오 다음과 같이 다른 필수 라이브러리와 함께 xgboost 라이브러리를 설치할 수 있습니다XGBoost 설치 오류

g++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d 
g++ -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp src/learner.cc -o build/learner.o 
In file included from dmlc-core/include/dmlc/logging.h:15, 
       from include/xgboost/logging.h:11, 
       from src/learner.cc:7: 
dmlc-core/include/dmlc/./base.h:71: note: #pragma message: Will need g++-4.6 or higher to compile allthe features in dmlc-core, compile without c++0x, some features may be disabled 
In file included from include/xgboost/./gbm.h:18, 
       from include/xgboost/learner.h:16, 
       from src/learner.cc:8: 
include/xgboost/././data.h: In constructor ‘xgboost::DMatrix::DMatrix()’: 
include/xgboost/././data.h:234: error: ‘nullptr’ was not declared in this scope 
In file included from include/xgboost/learner.h:16, 
       from src/learner.cc:8: 
include/xgboost/./gbm.h: At global scope: 
include/xgboost/./gbm.h:72: error: ‘nullptr’ was not declared in this scope 
In file included from src/learner.cc:17: 
src/./common/io.h:30: error: expected ‘;’ before ‘override’ 
src/learner.cc:496: error: expected ‘;’ at end of input 
src/learner.cc:496: error: expected ‘}’ at end of input 
In file included from src/learner.cc:17: 
src/./common/io.h: In constructor ‘xgboost::common::PeekableInStream::PeekableInStream(dmlc::Stream*)’: 
src/./common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘strm_’ 
src/./common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘buffer_ptr_’ 
src/./common/io.h: At global scope: 
src/./common/io.h:28: error: expected unqualified-id at end of input 
src/./common/io.h:28: error: expected ‘}’ at end of input 
src/./common/io.h:28: error: expected ‘}’ at end of input 
make: *** [build/learner.o] Error 1 

답변

1

: 나에게 다음과 같은 오류를 제공

git clone https://github.com/dmlc/xgboost.git --recursive 
cd xgboost 
make 

:

나는 다음을 실행 귀하의 프로젝트에서),이 대답의 주된 초점은 시각화 라이브러리와 함께 sklearn, pandas, scipy 및 xgboost 알고리즘이 필요한 대부분의 데이터 과학 프로젝트를 설정하는 데 도움이되는 것입니다.

# installing essentials 
apt-get update; \ 
apt-get install -y \ 
    python python-pip \ 
    build-essential \ 
    python-dev \ 
    python-setuptools \ 
    python-matplotlib \ 
    libatlas-dev \ 
    curl \ 
    libatlas3gf-base && \ 
    apt-get clean 

# upgrading pip 
curl -O https://bootstrap.pypa.io/get-pip.py && \ 
python get-pip.py && \ 
rm get-pip.py 
# installing libraries 
pip install numpy==1.13.1 
pip install scipy 
pip install -U scikit-learn 
pip install seaborn 
pip install --pre xgboost 

당신은 아직도 내가이 Dockerfile을 사용하는 것이 좋습니다 것이 환경 문제가 발생하는 경우. 이를 촉진하기 위해 Datmo 변환이 유용 할 수도 있습니다.

면책 조항 : 저는 Datmo이라고하는이 회사에서 일하면서 컴퓨터 학습 워크 플로를 단순화하여 개발자 커뮤니티를 구축하고 있습니다.