简体   繁体   English

Pycharm正在突出显示python2的语法,但是我正在使用python3

[英]Pycharm is highlighting syntax for python2, but I am using python3

I am using pycharm community edition 2017.1.5 and I have some problem.... 我正在使用pycharm社区版2017.1.5,我遇到了一些问题....

I am working in Python 3.6.1 but PyCharm is highlighting for python2. 我正在使用Python 3.6.1,但PyCharm突出显示了python2。

For example he is not allowing me to use print() function, because he is detecting print statement there. 例如,他不允许我使用print()函数,因为他在那里检测到print语句。 (That mean that it is only about syntax, because he know print() function but when I use it he says that it is print statement) (这意味着它仅与语法有关,因为他知道print()函数,但是当我使用它时,他说这是print语句)

EDIT: 编辑:

Its not finding print statement from python2 it says: Statement expected, found Py:PRINT_KEYWORD and it doesn't work like python2 print 它没有从python2中找到打印语句,它说: Statement expected, found Py:PRINT_KEYWORD ,它不能像python2 print那样工作

EDIT 2: 编辑2:

I don't know why but when I disable Pyxl plugin it is working correctly 我不知道为什么,但是当我禁用Pyxl插件时,它可以正常工作

You can configure python interpreter for PyCharm in Settings > Project Interpreter. 您可以在“设置”>“项目解释器”中为PyCharm配置python解释器。 Or to reconfigure default interpreter Settings > Default Project > Project Interpreter. 或重新配置默认解释器设置>默认项目>项目解释器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM