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
安装 xgboost

 

 安装 xgboost

 

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

 

相关文章:

  • 2021-09-14
  • 2021-08-31
  • 2021-12-16
  • 2022-03-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-03
猜你喜欢
  • 2021-12-02
  • 2021-12-26
  • 2021-06-13
  • 2021-12-08
相关资源
相似解决方案