【发布时间】:2019-09-03 14:36:41
【问题描述】:
我是 Python 3 和一般编程的新手,所以我查看了其他人的代码,只是为了开始将一个示例粘贴到 Jupyter 中。但一开始,我得到一个错误“ModuleNotFoundError: No module named 'xgboost'” 为什么这不起作用?
import pandas as pd
import numpy as np
import re
import sklearn
import xgboost as xgb // error
import seaborn as sns
import matplotlib.pyplot as plt
%matplotlib inline
import plotly.offline as py
py.init_notebook_mode(connected=True)
import plotly.graph_objs as go
import plotly.tools as tls
import warnings
warnings.filterwarnings('ignore')
# Going to use these 5 base models for the stacking
from sklearn.ensemble import (RandomForestClassifier, AdaBoostClassifier, GradientBoostingClassifier, ExtraTreesClassifier)
from sklearn.svm import SVC
from sklearn.cross_validation import KFold
【问题讨论】:
-
肯定有windows版本的。如果一个运行 Anaconda 的其他 cmets 包含指令,那将会很有帮助。上面的评论 (anaconda.org/anaconda/py-xgboost) (conda install -c anaconda py-xgboost) 中提供了在 python + Anaconda for Windows 64 上安装 xgboost 的链接
标签: python python-3.x module xgboost