导入模块时未定义调度程序

时间:2019-10-03 19:45:53

标签: python-3.x scikit-learn python-import mlxtend

我试图在Spyder IDE中导入一些模块:

from sklearn.neighbors import KNeighborsClassifier
from mlxtend.feature_selection import ExhaustiveFeatureSelector

对于上述两个import语句,我都会收到错误:

"NameError: name 'dispatcher' is not defined"

尝试安装软件包“ dispatcher”

1 个答案:

答案 0 :(得分:0)

在使用pandas.DataFrame.sample时,我有同样的错误。我使用版本1.15跟踪到numpy.random.choice的错误。我将numpy更新至版本1.17.3,此问题已解决。如果您使用的是conda,则可以输入

conda update numpy=1.17.3

在Anaconda提示上。