15

I'm trying to use Python 3.10 with PyCharm on Windows 10.

However, it gets recognized as Python 3.1 instead:

enter image description here

If I try to run my script, the interpreter complains that this version of Python is deprecated.

How can I resolve the issue?

Karl Knechtel
  • 62,466
  • 11
  • 102
  • 153
Felicidade
  • 159
  • 1
  • 1
  • 7

3 Answers3

15

You are likely using an old PyCharm version. Python 3.10 is rather new. Update PyCharm to at least 2020.2. See the relevant ticket in PyCharm's bug tracker https://youtrack.jetbrains.com/issue/PY-42855.

Pavel Karateev
  • 7,737
  • 3
  • 32
  • 59
  • Updating to the latest version of PyCharm indeed fixes this issue! – satishgoda Jul 30 '22 at 23:53
  • same here, was using pycharm 2020. got the 3.1 not supported but I verified 3.10 with `python.exe --version` updating to pycharm 2020, works with python 3.10.7 now. – Brian W Sep 22 '22 at 21:29
1

Conda 4.10 is incompatible with python 3.10.

It is not an issue with PyCharm, but a known bug in conda. Update your conda to the newest, or install a miniconda that already has python 3.10.

Read this SO answer for more details.

DanielTuzes
  • 2,494
  • 24
  • 40
0

You can change what python you are using in Settings -> Project: Python -> Project Interpreter

If you don't find the version, you can add it clicking on the icon aside it and locating a python.exe script in your pc.

In my case the default directory for the python.exe is C:\Users<myUser>\PycharmProjects\Python\venv\Scripts\python.exe

so I assume you can just get you version from https://www.python.org/downloads/ and put it there.