解决Error occurred when installing packagexgboost'.(pycharm上xgboost安装失败)

先上图:

解决Error occurred when installing packagexgboost'.(pycharm上xgboost安装失败)

在pycharm上直接安装xgboost出现Error occurred when installing packagexgboost' ,点进去看错误详情发现是Proposed solution: Try to run this command from the system terminal. Make sure that you use the correct version of ' pip' installed for your Python interpreter located at C:\ Users\53029\ AppData\ Local\ Continuum\ anaconda3\ python. exe'. 问题应该是安装时出现缺少某些链接导致的,查看网上方法完美解决,做个总结。

1. 下载源码地址:git clone --recursive

 

2.把下载的xgboost-master的压缩包解压到当前文件夹,并更名为xgboost(这里不更名也行,后安装时只需要到相应目录即可),然后将该文件夹放置你安装anaconda3(2)的目录下(即python.exe这个目录下)

3. 然后下载xgboost.dll包,链接:xgboost.dll,将其复制到步骤2中xgboost的文件夹下。

4. 找到你刚才xgboost的安装子文件夹下python-package包,复制路径。

5.进入命令提示符,进入步骤4 的路径,然后执行python setup.py install

ok,解决。再回到pycharm中看看是不是能安装成功了。

解决Error occurred when installing packagexgboost'.(pycharm上xgboost安装失败)