ModuleNotFoundError: 在 12.2 LTS 上找不到模块 ‘autoreload’

huangapple go评论52阅读模式
英文:

ModuleNotFoundError: No module named 'autoreload' on 12.2 LTS

问题

我正在使用 dbx 来进行混合模式开发循环。如果你想了解更多信息,可以查看这个链接

以下是相关步骤:

第一个单元格:

import autoreload
%load_ext autoreload
%autoreload 2

第二个单元格:

from pathlib import Path 
import sys

project_root = Path(".").absolute().parent
print(f"appending the main project code from {project_root}")
sys.path.append(project_root)

我之前在以下版本上运行代码时一切正常:

11.3 LTS (包括 Apache Spark 3.3.0, Scala 2.12)

我将集群升级到了:

12.2 LTS (包括 Apache Spark 3.3.2, Scala 2.12)

在升级后,我遇到了错误:

ModuleNotFoundError: No module named 'autoreload'

我了解额外空格的问题,但在这里并不是这个问题。

有人知道如何解决吗?

英文:

I am using dbx to work on mixed-mode development loop. This is the link in case you want to read about it.

This are the steps:

First cell:

import autoreload
%load_ext autoreload
%autoreload 2

Second cell:

from pathlib import Path 
import sys

project_root = Path(".").absolute().parent
print(f"appending the main project code from {project_root}")
sys.path.append(project_root)

I was running the code perfectly with:

11.3 LTS (includes Apache Spark 3.3.0, Scala 2.12)

I updated the cluster to:

12.2 LTS (includes Apache Spark 3.3.2, Scala 2.12)

When doing so I got error:
ModuleNotFoundError: No module named 'autoreload'

I know about the issue with the extra space but it is not the case here.

Does anyone know who to solve it?

答案1

得分: 1

不需要这一行:

import autoreload

即使在12.x版本之前,这个扩展也可以正常工作。

英文:

You don't need this line:

import autoreload

this extension works without it even before 12.x versions

huangapple
  • 本文由 发表于 2023年3月7日 00:41:18
  • 转载请务必保留本文链接:https://go.coder-hub.com/75653503.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定