简体   繁体   中英

My Pycharm dont recognize python 3.10, how do I configure it?

When I use the python version 3.10 it is recognized as python 3.1 in Pycharm and this is a deprecated version. My OS is Windows 10.

I'd to like to know how to fit it, I got no answer on the pycharm issues.

Thanks in advance!

What do you mean by it is recognized as python 3.1 by Pycharm? You mean that in Pycharm interpreter settings you see Python3.1 instead of Python3.10. To see the interpreter version https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html#interpreter

It it's the case, may be it's just a UI issue for Pycharm. Can you execute this python script:

import sys
print("Python version")
print (sys.version)

from your pycharm?

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.

在此处输入图像描述

It is recognize as python 3.1 instead of 3.10

if I run my script the interpreter alerts to a deprecated python verion.

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 .

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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