1.打开Anaconda Prompt
2.输入命令:
pip install xgboost -i https://pypi.tuna.tsinghua.edu.cn/simple
“-i https://pypi.tuna.tsinghua.edu.cn/simple
"这是清华镜像,包从这里下载,速度比较快;否则,默认国外的镜像,下载速度慢,可能会安装失败。
注:如果是给pytorch或者是给tensorflow安装xgboost,就先输入activate pytorch 进入pytorch或者tensorflow环境中,再安装。
参考链接:https://www.cnblogs.com/JetpropelledSnake/p/12080988.html