pydevd_resolver.py:138: SyntaxWarning: “不是”带有文字。你的意思是“!=”?如果 found.get(name) 不是 1:

use*_*895 8 pycharm

python 新手并使用 Pycharm 2019.1.3 Professional 和 Python 3.8.0 在我打开 Python 控制台时收到以下错误有谁知道如何解决这个问题?

C:\Program Files\JetBrains\PyCharm 2019.1.3\helpers\pydev\_pydevd_bundle\pydevd_resolver.py:138: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if found.get(name) is not 1:```


[error image]: https://i.stack.imgur.com/xYy2P.png
Run Code Online (Sandbox Code Playgroud)

Kon*_*tor 9

您发布的是在 Python 3.8 中实现的新警告。阅读这篇文章了解更多详情。警告本身并不是 Python 控制台不起作用的原因。

原因在底部:TypeError: an integer is required (got type bytes)。

我认为您的 PyCharm 版本可能根本不支持 Python 3.8。根据这个,你需要至少版本2019.3。

  • 如果你**没有**使用 `is not`,我可以发誓,python linters 会抱怨,因为 != 是“不是 pythonic” (3认同)