几天来,我的 jupyter 笔记本出现问题。我当时没有修复它们,但现在决定修复。早些时候,每当我在 jupyter 笔记本中执行任何操作时,它都会在终端(而不是笔记本中)显示一长串错误。我在 jupyterlab 中尝试了同样的方法,但还是出现了同样的错误。我升级了 ipykernel,不知何故它又开始工作了。但是这次它只执行了一些语句,例如print(hello world)
我尝试使用其他一些类似的东西:
a = 1
b = 2
a+b
Run Code Online (Sandbox Code Playgroud)
但它给了我这个错误:
TypeError Traceback (most recent call last)
/usr/lib/python3.8/codeop.py in __call__(self, source, filename, symbol)
134
135 def __call__(self, source, filename, symbol):
--> 136 codeob = compile(source, filename, symbol, self.flags, 1)
137 for feature in _features:
138 if codeob.co_flags & feature.compiler_flag:
TypeError: required field "type_ignores" missing from Module
Run Code Online (Sandbox Code Playgroud)
我尝试了其他的事情,比如导入一个模块,但同样的错误。我将 Ubuntu 20.04 与 python 3.8.2 一起使用。我该怎么办?以下是所有已安装的库:
absl-py==0.9.0
aiohttp==3.6.2
altgraph==0.17
appdirs==1.4.4
apptools==4.5.0
apturl==0.5.2
argon2-cffi==20.1.0
asgiref==3.2.10
astroid==2.4.2 …Run Code Online (Sandbox Code Playgroud)