ubuntu系统:

sudo -H pip install -i https://mirrors.ustc.edu.cn/pypi/web/simple xgboost

出现问题:requires python‘>3.4’,but the running python is 2.7.15

后来重新找了教程

如下:

# 创建一个名字为xgboost的环境
conda creat -n xgboost python=3.7.4

# 使用这个环境
source activate xgboost

# 安装
pip install xgboost --index https://pypi.mirrors.ustc.edu.cn/simple/
成功安装

打开pycharm

import xgboost # 显示不能导入

继续寻找教程

在pycharm中导包
File-Settings-project interpreter

 

 

 

 重新启动pycharm  可以使用xgboost了。

 

posted on 2019-09-30 09:54  臭臭的球球  阅读(984)  评论(0编辑  收藏  举报