【发布时间】:2020-07-02 04:43:49
【问题描述】:
我正在尝试将现有 Jupyter 笔记本中的函数导入新笔记本。这两个笔记本都保存在我一直在研究的虚拟环境中。我试图在 new notebook 中执行的命令如下:
from Probability.ipynb import norm_cdf
概率 = 旧笔记本
norm_cdf = 函数名
我收到以下错误:
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-4-9659a841148e> in <module>
----> 1 from Probability.ipynb import norm_cdf
ModuleNotFoundError: No module named 'Probability'
提前感谢您的帮助!
【问题讨论】:
-
这能回答你的问题吗? import a function from another .ipynb file
标签: python function import jupyter-notebook