c语言sscanf函数的用法是什么
449
2022-08-26
ubuntu pip安装xgboost的CMake 3.13 or higher is required. You are running version 3.10.2
今天在装xgboost的时候出现了下面的错误:
INFO:XGBoost build_ext:Building from source. /tmp/pip-install-elc4qdig/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'] CMake Error at CMakeLists.txt:1 (cmake_minimum_required): CMake 3.13 or higher is required. You are running version 3.10.2 -- Configuring incomplete, errors occurred! WARNING:XGBoost build_ext:Disabling OpenMP support. 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'] CMake Error at CMakeLists.txt:1 (cmake_minimum_required): CMake 3.13 or higher is required. You are running version 3.10.2 -- Configuring incomplete, errors occurred! Traceback (most recent call last): File "/tmp/pip-install-elc4qdig/xgboost/setup.py", line 160, in build_cmake_extension self.build(src_dir, build_dir, gen, build_tool, use_omp=1) File "/tmp/pip-install-elc4qdig/xgboost/setup.py", line 110, in build subprocess.check_call(cmake_cmd, cwd=build_dir) File "/home/wugaosheng/anaconda3/lib/python3.7/subprocess.py", line 341, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: 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']' returned non-zero exit status 1. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "
解决方法
sudo apt remove --purge cmakehash -rsudo snap install cmake --classiccmake --versionpip install xgboost
更新一下cmake就行了哈。
我的日志输出为:
wugaosheng@s206:~/tianchi_job_match/src$ cmake --versioncmake version 3.17.3CMake suite maintained and supported by Kitware (kitware.com/cmake).wugaosheng@s206:~/tianchi_job_match/src$ pip install xgboostLooking in indexes: xgboost Downloading (731kB) 100% |████████████████████████████████| 737kB 2.3MB/sRequirement already satisfied: numpy in /home/wugaosheng/anaconda3/lib/python3.7/site-packages (from xgboost) (1.15.4)Requirement already satisfied: scipy in /home/wugaosheng/anaconda3/lib/python3.7/site-packages (from xgboost) (1.1.0)Building wheels for collected packages: xgboost Running setup.py bdist_wheel for xgboost ... done Stored in directory: /home/wugaosheng/.cache/pip/wheels/e8/28/d4/db7f1dda731e5e14f4349e2c9dcd426a1b83720adae96c3afbSuccessfully built xgboostInstalling collected packages: xgboostSuccessfully installed xgboost-1.1.1
参考文献
[1]. Installing the latest CMake on Ubuntu 18.04. https://graspingtech.com/upgrade-cmake/#:~:text=The%20version%20of%20CMake%20installed,2.
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~