ImportError: cannot import name '_print_elapsed_time'

南楼画角 提交于 2020-03-02 04:27:03

问题


Hi so I'm trying to use the make_pipeline module in sklearn. But when I try to import it with:

from sklearn.pipeline import make_pipeline

I get this error:

ImportError: cannot import name '_print_elapsed_time'

I've googled it but there seems to be no other posts about this. I tried reinstalling scikitlearn but I still get the same error :/ Anyone have any ideas?


回答1:


It looks like this was a bug introduced into one of the newer versions of scikit-learn (I got this same issue in version 0.21.2).

I was able to fix this by downgrading to scikit-learn version 0.20.0

>> pip install scikit-learn==0.20.0


来源:https://stackoverflow.com/questions/56566901/importerror-cannot-import-name-print-elapsed-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!