The imp module is deprecated(imp 模块已弃用)
问题描述
每当我尝试使用sklearn"时在 PyCharm 中,我在控制台上收到以下错误.
Whenever I try to use "sklearn" in PyCharm, I get the following error on the console.
DeprecationWarning:不推荐使用 imp 模块以支持 importlib;请参阅模块的文档以了解其他用途进口小鬼
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.
推荐答案
我从cloudpickle.py"中删除了导入imp"的代码警告消失了,但我希望我没有搞砸任何事情.您也可以简单地忽略它,因为它不是错误.
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.
我不想删除问题或答案,因为人们仍在访问此页面,但这不是解决方案,而且处理它的方法很糟糕,请忽略此警告.我在非常业余的日子里这样做了,对不起:(
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 :(
这篇关于imp 模块已弃用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:imp 模块已弃用


- YouTube API v3 返回截断的观看记录 2022-01-01
- CTR 中的 AES 如何用于 Python 和 PyCrypto? 2022-01-01
- 使用公司代理使Python3.x Slack(松弛客户端) 2022-01-01
- ";find_element_by_name(';name';)";和&QOOT;FIND_ELEMENT(BY NAME,';NAME';)";之间有什么区别? 2022-01-01
- 我如何透明地重定向一个Python导入? 2022-01-01
- 使用 Cython 将 Python 链接到共享库 2022-01-01
- 计算测试数量的Python单元测试 2022-01-01
- 我如何卸载 PyTorch? 2022-01-01
- 如何使用PYSPARK从Spark获得批次行 2022-01-01
- 检查具有纬度和经度的地理点是否在 shapefile 中 2022-01-01