当我导入一个包时,我收到以下弃用消息。我找不到任何关于它的文档。我知道我可以抑制警告,但我想知道发生了什么。
import pandas as pd
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
and should_run_async(code)
Run Code Online (Sandbox Code Playgroud)
安装:Mac OS 上的 Python 3.8.5、jupyter-client 6.1.6、jupyter-core 4.6.3、jupyterlab 2.2.4、jupyterlab-server 1.2.0
And*_*nes 16
升级ipykernel5.3.4 似乎为我修复了它。
pip install --upgrade ipykernel
Run Code Online (Sandbox Code Playgroud)
确保之后重新启动 Juptyer 服务器。
我通过插入一个breakpoint()at/ipkernel.py:287并使用w来查看调用的内容来想出这个。如果此修复程序对您不起作用,则值得检查一下您的情况。
Tom*_*ski 13
这里与 ipykernel==5.3.4 和 ipython==7.19.0 相同。降级到 ipython 7.10.0 解决了这个问题。
pip install install ipython==7.10.0
Run Code Online (Sandbox Code Playgroud)
可选择用于抑制 DeprecationWarnings:
import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
21435 次 |
| 最近记录: |