[英]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.