【发布时间】:2020-03-24 09:46:15
【问题描述】:
我的一些程序可以正常运行,但我仍然收到以下错误代码。它对程序本身没有影响,但我仍然想解决它。
C:\Program Files\JetBrains\PyCharm Community Edition 2019.2.3\helpers\pycharm\docrunner.py:1: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
【问题讨论】:
-
使用 importlib 消除警告并确保您的代码向前兼容 blog.pythonlibrary.org/2016/05/27/…
标签: python warnings suppress-warnings deprecation-warning