简体   繁体   English

尝试在 Ubuntu 16.04 虚拟机中安装“xgboost”时出现“找不到命令”错误

[英]I'm getting a "command not found" error when trying to install "xgboost" in an Ubuntu 16.04 Virtual Machine

I'm trying to install xgboost in an Ubuntu 16.04 virtual machine.我正在尝试在 Ubuntu 16.04 虚拟机中安装xgboost

I'm following this guide and ran this command:我正在遵循本指南并运行此命令:

cmake ..

I got this error:我收到此错误:

-bash: cmake: command not found

What am I doing wrong and how can I get rid of this error?我做错了什么,我怎样才能摆脱这个错误?

Try this:尝试这个:

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:george-edison55/cmake-3.x
sudo apt-get update 
sudo apt-get install cmake

UPDATE: Or you can just use pip:更新:或者你可以只使用 pip:

sudo pip3 install xgboost

It appears you're getting this error because you don't have the cmake command installed, you can fix this by running:看起来你收到这个错误是因为你没有安装cmake命令,你可以通过运行来解决这个问题:

sudo apt install cmake

I don't know if you've missed this but you can also install xgboost using pip (or in your case pip3 ), like this:我不知道您是否错过了这一点,但您也可以使用pip (或在您的情况下pip3 )安装xgboost ,如下所示:

pip3 install xgboost

NOTE : depending on how your user/project is set up you might need to use the sudo command to grant pip3 write privileges to certain (root) directories, if this is the case, you'd use:注意:根据您的用户/项目的设置方式,您可能需要使用sudo命令向某些(根)目录授予pip3写入权限,如果是这种情况,您可以使用:

sudo pip3 install xgboost

NOTE: if you don't have pip3 installed, you can install it using:注意:如果您没有安装pip3 ,您可以使用以下命令安装它:

sudo apt install python3 python3-pip

Good luck.祝你好运。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 尝试安装scipy时出现奇怪的错误 - I'm getting a weird error when trying to install scipy 尝试安装 xgboost、Mac 时出错 - Error when trying to install xgboost, Mac 当我尝试通过 python 脚本执行 shell 命令时出现错误“找不到模块” - I'm getting an error “module not found ” when I'm trying to execute shell commands through a python script 尝试在Ubuntu 16.04中安装OpenCv 3时遇到问题 - Trouble trying to install OpenCv 3 in ubuntu 16.04 尝试安装命令“ python setup.py egg_info”失败时出现错误代码1 - I am getting this error when I am trying to install Command “python setup.py egg_info” failed with error code 1 当我尝试在虚拟环境中通过“pip3 install translate”安装 package(翻译)时出现错误 - Getting an error when i try to install a package (translate) by “pip3 install translate” in virtual environment 如何在Ubuntu 16.04上的Python 3 / Matplotlib 2中安装底图? - How can I install Basemap in Python 3 / Matplotlib 2 on Ubuntu 16.04? Tensorflow GPU 安装 Ubuntu 16.04 错误 (libcuda.so not found) - Tensorflow GPU installation Ubuntu 16.04 Error (libcuda.so not found) 尝试安装 pyaudio 时出现 HTTP 错误 - Getting HTTP error when trying to install pyaudio 尝试安装python时出错 - Getting error when trying to install python
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM