尝试在 Ubuntu 16.04 虚拟机中安装 "xgboost" 时出现 "command not found" 错误
I'm getting a "command not found" error when trying to install "xgboost" in an Ubuntu 16.04 Virtual Machine
我正在尝试在 Ubuntu 16.04 虚拟机中安装 xgboost
。
我正在执行 this guide 和 运行 这个命令:
cmake ..
我收到这个错误:
-bash: cmake: command not found
我做错了什么,我怎样才能摆脱这个错误?
试试这个:
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
更新:
或者您可以只使用 pip:
sudo pip3 install xgboost
您收到此错误似乎是因为您没有安装 cmake
命令,您可以通过 运行:
解决此问题
sudo apt install cmake
我不知道你是否错过了这个,但你也可以使用 pip
(或者在你的情况下 pip3
)安装 xgboost
,像这样:
pip3 install xgboost
注意:根据您的 user/project 设置方式,您可能需要使用 sudo
命令授予 pip3
写入权限对于某些(根)目录,如果是这种情况,您将使用:
sudo pip3 install xgboost
注意:如果您没有安装pip3
,您可以使用:
安装它
sudo apt install python3 python3-pip
祝你好运。
我正在尝试在 Ubuntu 16.04 虚拟机中安装 xgboost
。
我正在执行 this guide 和 运行 这个命令:
cmake ..
我收到这个错误:
-bash: cmake: command not found
我做错了什么,我怎样才能摆脱这个错误?
试试这个:
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
更新: 或者您可以只使用 pip:
sudo pip3 install xgboost
您收到此错误似乎是因为您没有安装 cmake
命令,您可以通过 运行:
sudo apt install cmake
我不知道你是否错过了这个,但你也可以使用 pip
(或者在你的情况下 pip3
)安装 xgboost
,像这样:
pip3 install xgboost
注意:根据您的 user/project 设置方式,您可能需要使用 sudo
命令授予 pip3
写入权限对于某些(根)目录,如果是这种情况,您将使用:
sudo pip3 install xgboost
注意:如果您没有安装pip3
,您可以使用:
sudo apt install python3 python3-pip
祝你好运。