报错如下:
安装xgboost后仍报错:cannot import name ‘XGBRegressor‘ from ‘xgboost‘
原因:我的py文件名也叫xgboost,Python在编译时把xgboost.py当成了一个module,自然在这个"module"里是找不到XGBRegressor的。
解决方案:重命名py文件。

相关文章:

  • 2021-09-28
  • 2021-07-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-27
  • 2022-12-23
  • 2021-07-23
猜你喜欢
  • 2021-07-09
  • 2022-12-23
  • 2021-10-28
  • 2021-06-26
  • 2021-06-28
  • 2021-09-22
  • 2021-04-13
相关资源
相似解决方案