我正在尝试在 Red Hat 服务器上安装 xgboost 和 TPOT,但它拒绝使用 pip3 安装。我目前收到一个错误,其中这些是最重要的部分。
copying xgboost/CMakeLists.txt -> build/temp.linux-x86_64-3.6/xgboost
copying xgboost/LICENSE -> build/temp.linux-x86_64-3.6/xgboost
INFO:XGBoost build_ext:Building from source. /tmp/pip-build-uvm9zqkr/lib/libxgboost.so
INFO:XGBoost build_ext:Run CMake command: ['cmake', 'xgboost', '-GUnix Makefiles', '-DUSE_OPENMP=1',
'-DUSE_CUDA=0', '-DUSE_NCCL=0', '-DBUILD_WITH_SHARED_NCCL=0', '-DHIDE_CXX_SYMBOLS=1', '-DUSE_HDFS=0',
'-DUSE_AZURE=0', '-DUSE_S3=0', '-DPLUGIN_LZ4=0', '-DPLUGIN_DENSE_PARSER=0',
DUSE_SYSTEM_LIBXGBOOST=0']
error: [Errno 2] No such file or directory: 'cmake': 'cmake'
Failed building wheel for xgboost
Running setup.py clean for xgboost
Failed to build xgboost
Installing collected packages: xgboost, tpot
Running setup.py install for xgboost ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-
build-uvm9zqkr/xgboost/setup.py';f=getattr(tokenize, 'open', open)
(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))"
install --record /tmp/pip-3em2gmv0-record/install-record.txt --single-version-externally-managed --
compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/xgboost
INFO:XGBoost build_ext:Run CMake command: ['cmake', 'xgboost', '-GUnix Makefiles', '-DUSE_OPENMP=1', '-DUSE_CUDA=0', '-DUSE_NCCL=0', '-DBUILD_WITH_SHARED_NCCL=0', '-DHIDE_CXX_SYMBOLS=1', '-DUSE_HDFS=0', '-DUSE_AZURE=0', '-DUSE_S3=0', '-DPLUGIN_LZ4=0', '-DPLUGIN_DENSE_PARSER=0', '-DUSE_SYSTEM_LIBXGBOOST=0']
error: [Errno 2] No such file or directory: 'cmake': 'cmake'
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-
uvm9zqkr/xgboost/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n',
'\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-3em2gmv0-
record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in
/tmp/pip-build-uvm9zqkr/xgboost/
我已经成功通过 git 在服务器上安装了 xgboost。我无法通过 git 安装 TPOT,因为安装似乎只针对 Debian 系统编写,让我不知所措。
答案 0 :(得分:0)
报错提示需要安装cmake。