导入模块时未定义调度程序 [英] dispatcher not defined when importing module

查看:51
本文介绍了导入模块时未定义调度程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I was attempting to import some modules in a Spyder IDE:

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

对于上面的两个导入语句,我都收到错误:

For both of the import statements above I get the error:

"NameError: name 'dispatcher' is not defined"

尝试安装包dispatcher"

Tried install package "dispatcher"

推荐答案

我有同样的错误,但在使用 pandas.DataFrame.sample.我设法将错误跟踪到 numpy.random.choice,我使用的是 1.15 版.我将 numpy 更新到 1.17.3 版,问题解决了.如果您使用的是 conda,您可以输入

I had the same error, but while using pandas.DataFrame.sample. I managed to track the error to numpy.random.choice, I was using version 1.15. I updated numpy to version 1.17.3 and the issue was solved. If you are using conda, you can do so by typing

conda 更新 numpy=1.17.3

在 Anaconda 提示符下.

on the Anaconda prompt.

这篇关于导入模块时未定义调度程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆