我正在使用 Papermill 的 python 客户端运行一个 jupyter notebook 脚本。运行时,我想指定内核。但是,该脚本与我的活动 python shell 在同一个内核中运行(通过它我对 papermill 进行 API 调用以运行笔记本的脚本)。
我尝试查看文档(https://papermill.readthedocs.io/en/latest/usage-execute.html#execute-via-the-python-api)但徒劳无功。
import papermill as pm
pm.execute_notebook( 'dfnjofnei.ipynb', 'dfnjofnei_output.ipynb' )