python - PyCharm Unresolved reference 'print'

标签 python pycharm

我开始学习 python 语言,并决定尝试 PyCharm IDE,它看起来非常不错。但是,每当我写 print 时,它都会显示“ Unresolved reference 'print'”。我可以运行程序,但是这个红色下划线真的很烦人。我该如何解决这个问题?

最佳答案

我遇到了和你一样的问题,尽管我将 Python 3.4.0 配置为项目的解释器并且代码中的所有 print 都是符合 Python 3 的函数调用。

我通过在 PyCharm 中这样做来解决它:

File -> Invalidate Caches / Restart... -> Invalidate and Restart

关于python - PyCharm Unresolved reference 'print',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22738455/

相关文章:

Python 2.7 ctrl+c 不确定行为

python-3.x - 在selenium python中检测浏览器的语言?

python - 在字典列表中搜索的最有效方法

python - 动态规划 - 洗车

python - 将 mongodb 返回对象转换为字典

python - python pandas 中的嵌套数据框/索引

python - 由于 SSL,Pycharm 安装包失败

intellij-idea - 使用 Intellij/PyCharm 在 HTML 中选择结束标记

python - 关闭 'Python version 3.5 does not support variable annotations' 错误信息

javascript - 每个语句的 for 循环等效吗?