小编Bem*_*huo的帖子

“从 __future__ 导入注释”导致 VSCode 中的“注释未定义”

    from __future__ import annotations
SyntaxError: future feature annotations is not defined
Run Code Online (Sandbox Code Playgroud)

当我尝试在 VSCode 终端中运行我的代码时出现此错误。当我用 PyCharm 运行我的代码时,我从来没有出现过这个错误。我只是不明白是什么让它在 VSCode 中不起作用。

我使用 Python 3.7 作为我的项目解释器。

python import python-3.x visual-studio-code

5
推荐指数
1
解决办法
6905
查看次数

标签 统计

import ×1

python ×1

python-3.x ×1

visual-studio-code ×1