PyCharm under Mac parses the py file into a text file solution

PyCharm interprets a certain py file as a text file without code hints and cannot be executed.

Restarting, reinstalling, or deleting the IDE configuration is not good (maybe the IDE configuration was not deleted), but later found that it was a problem with the File Types setting.

Solution:

  • Windows:【File】->【Settings】->【Editor】->【File Types】->选择【Text】
  • Mac:【Pycharm】->【Preferences】->【Editor】->【File Types】->选择【Text】

Find the grayed-out file name suffix in [Registered Patterns], click Delete and save it.

Guess you like

Origin blog.csdn.net/yilovexing/article/details/114436867