【问题标题】:Importing module in jupyterlab notebook在 jupyterlab 笔记本中导入模块
【发布时间】:2020-12-01 02:53:17
【问题描述】:

目前正在学习 Eric Mathes 的 Python 速成课程

无法按照第 243 页的要求从另一个文件导入模块,this is the error I have been receiving

我不确定是否将 ipynb 更改为 py,这是否像在末尾用 .py 重命名文件一样简单 edit: this is a screenshot of the jupyterlab with notebook open and the file directory

【问题讨论】:

  • 试试这个from python_settings import settings
  • 能否添加setting.py文件的文件夹结构和示例内容

标签: python jupyter-notebook jupyter-lab modulenotfounderror


【解决方案1】:

将文件重命名为 settings.py 。然后在要使用它的笔记本中将代码从设置导入设置。

【讨论】:

    猜你喜欢
    • 2022-11-07
    • 1970-01-01
    • 2020-11-22
    • 2021-04-24
    • 2021-04-13
    • 1970-01-01
    • 2021-02-02
    • 2018-07-29
    • 2019-10-09
    相关资源
    最近更新 更多