[PyCharm] 'Python version 2.7 does not support this syntax.' Troubleshooting

[PyCharm] 'Python version 2.7 does not support this syntax.' Troubleshooting

Goal

  • To find the cause of ‘Python version 2.7 does not support this syntax.’ problem and solve it.
  • To change another python intepreter in PyCharm


Intro

  • I’m writing some posts about how to make Django project.
  • I used Python just liitle bit on CLi or Jupyter. However, I’ve never used PyCharm.
  • So, I faced a lot of problem by using PyCharm and I want to talk about setting Python intepreter.


Practice

Problem

  • Python version below 3.x not support the syntax that was used in my Django project.

screentshot001


Solution

  • Replace 2.7 interpreter with 3.x one

    • Preferences

    screentshot002

    • Project -> Project Interpreter

    screentshot003

    • Change interpreter

    screentshot004

    screentshot005

    screentshot006

    • Solved screentshot007



References

JetBrain Support

댓글남기기

-->