我试图在Spyder IDE中导入一些模块:
from sklearn.neighbors import KNeighborsClassifier
from mlxtend.feature_selection import ExhaustiveFeatureSelector
对于上述两个import语句,我都会收到错误:
"NameError: name 'dispatcher' is not defined"
尝试安装软件包“ dispatcher”
答案 0 :(得分:0)
在使用pandas.DataFrame.sample时,我有同样的错误。我使用版本1.15跟踪到numpy.random.choice的错误。我将numpy更新至版本1.17.3,此问题已解决。如果您使用的是conda,则可以输入
conda update numpy=1.17.3
在Anaconda提示上。