安装xgboost时,我一直遇到同样的错误
这是整个堆栈跟踪
pip install xgboost -v
Collecting xgboost
1 location(s) to search for versions of xgboost:
* https://pypi.python.org/simple/xgboost/
Getting page https://pypi.python.org/simple/xgboost/
Looking up "https://pypi.python.org/simple/xgboost/" in the cache
Current age based on date: 46
Freshness lifetime from max-age: 600
Freshness lifetime from request max-age: 600
The response is "fresh", returning cached response
600 > 46
Analyzing links from page https://pypi.python.org/simple/xgboost/
Found link https://pypi.python.org/packages/16/ac/dd16a3206de8658a5e0076174941ae642ee10c958c53a35a7500993ca936/xgboost-0.4a15.tar.gz#md5=bcab760af5ac7f20e88bde7426423565 (from https://pypi.python.org/simple/xgboost/), version: 0.4a15
Found link https://pypi.python.org/packages/20/95/c089ee1be6574ed8167f0bfbd5f78c1adc7b1403ba3977d5ae98003882af/xgboost-0.4a22.tar.gz#md5=cb858cf85fe9f4263e9b523c4900c3f9 (from https://pypi.python.org/simple/xgboost/), version: 0.4a22
Found link https://pypi.python.org/packages/21/5c/a221a2ea13ee14acd1ddc59e213fc788ebd2e7550249adbb12934367aa58/xgboost-0.4a28.tar.gz#md5=fd8ffedd172b5cb917483df76e6efe7a (from https://pypi.python.org/simple/xgboost/), version: 0.4a28
Found link https://pypi.python.org/packages/34/85/456a1a8c762f646671043e446a59efbce02b5f408f522c4ef8793e860c5e/xgboost-0.6a2.tar.gz#md5=c486211efa29b95771c74f5d8701ca4a (from https://pypi.python.org/simple/xgboost/), version: 0.6a2
Found link https://pypi.python.org/packages/4a/cc/9556005199e9f550c97bc1e81bff64431c952a9968f78651ba48b9687243/xgboost-0.4a26.tar.gz#md5=e5b1f7c477e5238e7b491153449b33b2 (from https://pypi.python.org/simple/xgboost/), version: 0.4a26
Found link https://pypi.python.org/packages/4f/70/a236e5170ab7f72cf49554400d841a2046d7c712e2cf6524a435612469a4/xgboost-0.4a25.tar.gz#md5=bf3d633fa88ae7923794dd5da0600388 (from https://pypi.python.org/simple/xgboost/), version: 0.4a25
Found link https://pypi.python.org/packages/58/85/94517fb4933fbc66c87df3f0166c48e421b1d3d082d8d0b29960f4e3b643/xgboost-0.4a30.tar.gz#md5=5f4e812ba3a1faa85514993e56c1b4b8 (from https://pypi.python.org/simple/xgboost/), version: 0.4a30
Found link https://pypi.python.org/packages/65/4e/05d8fe3dd568cf57fe76edb3018d2a7d8bc57611b8fef6dd2e4cfb6c794a/xgboost-0.4a12.tar.gz#md5=4d768e034a28590497bb79279f036946 (from https://pypi.python.org/simple/xgboost/), version: 0.4a12
Found link https://pypi.python.org/packages/6c/d7/b7e5027c95f1bd6676062af56bfbd53eee567f8384a4aa582330360a3989/xgboost-0.4a14.tar.gz#md5=a7c648933a47ae31f869b5c030c17c69 (from https://pypi.python.org/simple/xgboost/), version: 0.4a14
Found link https://pypi.python.org/packages/71/aa/206c86bc4be36832f8c73491d972a6c1bcdcd2717f1fb04d0bad0c61ae35/xgboost-0.4a23.tar.gz#md5=4f8a17ca86995ed51fc1a424618b94db (from https://pypi.python.org/simple/xgboost/), version: 0.4a23
Found link https://pypi.python.org/packages/7a/b4/fa38771ebd221dd83aa37864157daebb7d8446fd6c3614dc6f56932f9643/xgboost-0.4a19.tar.gz#md5=413d55d0534447e77064dbd1ad1ccb48 (from https://pypi.python.org/simple/xgboost/), version: 0.4a19
Found link https://pypi.python.org/packages/7e/16/d47c4ba06a5b4d364a7323013e040f3f21d50db2b50cfc962bad674b873f/xgboost-0.4a29.tar.gz#md5=4bf4eb1898cfc28bbd3b43e19c69fdf5 (from https://pypi.python.org/simple/xgboost/), version: 0.4a29
Found link https://pypi.python.org/packages/7f/36/e55ba853acc85d7ebaddec498c72c768bb2700415c5a2ea967a0b8dc8957/xgboost-0.6a1.tar.gz#md5=be2b2f4c6f439960da3f495da39b45e2 (from https://pypi.python.org/simple/xgboost/), version: 0.6a1
Found link https://pypi.python.org/packages/92/37/d7b963a6b307941e86758bd3330d62ace0c83eaf60fbacf8486a6e8d72da/xgboost-0.4a21.tar.gz#md5=45284beb53f5087e73dcf55ff1c5a026 (from https://pypi.python.org/simple/xgboost/), version: 0.4a21
Found link https://pypi.python.org/packages/97/7b/344e3b849bb041dca7c6cab66be8007f64cdceebcb41cda9f1e10bc651d9/xgboost-0.4a13.tar.gz#md5=5f53d51e4305c679192b3cabda2b0dbe (from https://pypi.python.org/simple/xgboost/), version: 0.4a13
Found link https://pypi.python.org/packages/b3/ec/110721470306e8c9199c46217cfff5c32ad1e7e8a2dabefa2603d79b32bc/xgboost-0.4a18.tar.gz#md5=9f70ca05843afb1d50522530f140d640 (from https://pypi.python.org/simple/xgboost/), version: 0.4a18
Found link https://pypi.python.org/packages/ca/58/2c3265f4824a8c3a33784e7236adb7808d3c647cfe962045fcc53d10d570/xgboost-0.4a24.tar.gz#md5=2bf0edfe62ddb3502c4f48df3428a7e0 (from https://pypi.python.org/simple/xgboost/), version: 0.4a24
Found link https://pypi.python.org/packages/cd/4d/9a9341759aa32358b794db9e21cd0825e9107e2fc7a641e285eb1b0b69b8/xgboost-0.4a20.tar.gz#md5=88721733e7c7026fa2e95de7165d4b86 (from https://pypi.python.org/simple/xgboost/), version: 0.4a20
Found link https://pypi.python.org/packages/ec/c1/93d27b079b5edd76bc93d6cefcf82e667942bb576a5f764742401febe161/xgboost-0.4a27.tar.gz#md5=cd091569f651c3c625c4a299cfc72e74 (from https://pypi.python.org/simple/xgboost/), version: 0.4a27
Using version 0.6a2 (newest of versions: 0.4a12, 0.4a13, 0.4a14, 0.4a15, 0.4a18, 0.4a19, 0.4a20, 0.4a21, 0.4a22, 0.4a23, 0.4a24, 0.4a25, 0.4a26, 0.4a27, 0.4a28, 0.4a29, 0.4a30, 0.6a1, 0.6a2)
Looking up "https://pypi.python.org/packages/34/85/456a1a8c762f646671043e446a59efbce02b5f408f522c4ef8793e860c5e/xgboost-0.6a2.tar.gz" in the cache
Current age based on date: 74829
Freshness lifetime from max-age: 31557600
The response is "fresh", returning cached response
31557600 > 74829
Using cached xgboost-0.6a2.tar.gz
Downloading from URL https://pypi.python.org/packages/34/85/456a1a8c762f646671043e446a59efbce02b5f408f522c4ef8793e860c5e/xgboost-0.6a2.tar.gz#md5=c486211efa29b95771c74f5d8701ca4a (from https://pypi.python.org/simple/xgboost/)
Running setup.py (path:/private/var/folders/9n/3wvfx50j4rjd1cyqcl_mpm5r0000gn/T/pip-build-ear0ymjl/xgboost/setup.py) egg_info for package xgboost
Running command python setup.py egg_info
rm -f -rf build build_plugin lib bin *~ */*~ */*/*~ */*/*/*~ */*.o */*/*.o */*/*/*.o xgboost
clang-omp++ -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
/bin/sh: clang-omp++: command not found
make: *** [build/learner.o] Error 127
make: *** Waiting for unfinished jobs....
clang-omp++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d
/bin/sh: clang-omp++: command not found
make: *** [build/logging.o] Error 127
-----------------------------
Building multi-thread xgboost failed
Start to build single-thread xgboost
rm -f -rf build build_plugin lib bin *~ */*~ */*/*~ */*/*/*~ */*.o */*/*.o */*/*/*.o xgboost
clang-omp++ -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
/bin/sh: clang-omp++: command not found
make: *** [build/learner.o] Error 127
make: *** Waiting for unfinished jobs....
clang-omp++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d
/bin/sh: clang-omp++: command not found
make: *** [build/logging.o] Error 127
Successfully build single-thread xgboost
If you want multi-threaded version
See additional instructions in doc/build.md
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/9n/3wvfx50j4rjd1cyqcl_mpm5r0000gn/T/pip-build-ear0ymjl/xgboost/setup.py", line 29, in <module>
LIB_PATH = libpath['find_lib_path']()
File "/private/var/folders/9n/3wvfx50j4rjd1cyqcl_mpm5r0000gn/T/pip-build-ear0ymjl/xgboost/xgboost/libpath.py", line 45, in find_lib_path
'List of candidates:\n' + ('\n'.join(dll_path)))
XGBoostLibraryNotFound: Cannot find XGBoost Libarary in the candicate path, did you install compilers and run build.sh in root path?
List of candidates:
/private/var/folders/9n/3wvfx50j4rjd1cyqcl_mpm5r0000gn/T/pip-build-ear0ymjl/xgboost/xgboost/libxgboost.so
/private/var/folders/9n/3wvfx50j4rjd1cyqcl_mpm5r0000gn/T/pip-build-ear0ymjl/xgboost/xgboost/../../lib/libxgboost.so
/private/var/folders/9n/3wvfx50j4rjd1cyqcl_mpm5r0000gn/T/pip-build-ear0ymjl/xgboost/xgboost/./lib/libxgboost.so
Cleaning up...
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/9n/3wvfx50j4rjd1cyqcl_mpm5r0000gn/T/pip-build-ear0ymjl/xgboost/
Exception information:
Traceback (most recent call last):
File "/qwe/qwdfg/anaconda3/anaconda/envs/kaggle3/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/qwe/qwdfg/anaconda3/anaconda/envs/kaggle3/lib/python3.5/site-packages/pip/commands/install.py", line 310, in run
wb.build(autobuilding=True)
File "/qwe/qwdfg/anaconda3/anaconda/envs/kaggle3/lib/python3.5/site-packages/pip/wheel.py", line 750, in build
self.requirement_set.prepare_files(self.finder)
File "/qwe/qwdfg/anaconda3/anaconda/envs/kaggle3/lib/python3.5/site-packages/pip/req/req_set.py", line 370, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/qwe/qwdfg/anaconda3/anaconda/envs/kaggle3/lib/python3.5/site-packages/pip/req/req_set.py", line 601, in _prepare_file
abstract_dist.prep_for_dist()
File "/qwe/qwdfg/anaconda3/anaconda/envs/kaggle3/lib/python3.5/site-packages/pip/req/req_set.py", line 127, in prep_for_dist
self.req_to_install.run_egg_info()
File "/qwe/qwdfg/anaconda3/anaconda/envs/kaggle3/lib/python3.5/site-packages/pip/req/req_install.py", line 425, in run_egg_info
command_desc='python setup.py egg_info')
File "/qwe/qwdfg/anaconda3/anaconda/envs/kaggle3/lib/python3.5/site-packages/pip/utils/__init__.py", line 718, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/9n/3wvfx50j4rjd1cyqcl_mpm5r0000gn/T/pip-build-ear0ymjl/xgboost/
我正在使用anaconda3,这是我的版本
python --version
Python 3.5.2 :: Continuum Analytics, Inc.
pip --version
pip 8.1.2 from /qwe/sfweg/anaconda3/anaconda/envs/kaggle3/lib/python3.5/site-packages (python 3.5)
which easy_install
/qwe/sfweg/anaconda3/anaconda/envs/kaggle3/bin/easy_install
cat /qwe/sfweg/anaconda3/anaconda/envs/kaggle3/bin/easy_install
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==28.7.1','console_scripts','easy_install'
__requires__ = 'setuptools==28.7.1'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(
load_entry_point('setuptools==28.7.1', 'console_scripts', 'easy_install')()
如何在没有任何错误的情况下安装xgboost?