The imp module is deprecated [duplicate]

混江龙づ霸主 提交于 2020-11-26 10:24:37

问题


Whenever I try to use "sklearn" in pycharm, I get the following error on the console.

DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp

I am not sure if it should bother me, because program still working, but it's annoying. How can I get rid of it?

I made every change, people recommended in linked question but the error is still there.

Thank you


回答1:


I deleted the code that imports "imp", from "cloudpickle.py" and the warning is gone but I hope I didn't mess up anything. You can also simply ignore this, since it's not an error.

Edit: I don't want to remove the question or answer because people still visit this page but this is not a solution and it is a bad way to handle it, just ignore this warning. I did this in my very amateur days, sorry :(



来源:https://stackoverflow.com/questions/52596204/the-imp-module-is-deprecated

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