我是一名新手Python用户,试图在工作笔记本电脑上安装xgboost模块,使用Jupyter notebook。
能够顺利导入pandas、numpy和sklearn等模块。
然而当我尝试运行 import xgboost as xgb 时会出现错误消息:
---------------------------------------------------------------------------
ModuleNotFoundError
Traceback (most recent call last)
Input
In [4]
, in <cell line: 1>
()
----> 1
import
xgboost
as
xgb
ModuleNotFoundError
: No module named 'xgboost'
我已在命令行使用pip安装了 xgboost,并在运行 pip list 时可以看到 xgboost。
那我做错了哪里?
评论 (0)