Loading a virtual environment
I am using pycharm community. When I try to add a virtual environment for my project, it gives an error of Invalid SDK.
The interesting thing is that I am using python3.9 and I made the virtual env using powershell (as I was not able to make it from pycharm). But the error it gives me is: “Cannot set up a python SDK at Python 3.12”. I don't have 3.12 installed on my PC.
This occurs only for python3.9 environments. python 3.6 and 3.7 projects' environment works fine.
Python3.9 utils working fine on VS Code as well. There seems to be no issues with python version.


NOTE: [Never mind the environment names, these screenshots are from 2 different tries]
请先登录再写评论。
Greetings and thank you for contacting JetBrains support team!
Does it help to perform below workaround which was mentioned in below YouTrack issue:
https://youtrack.jetbrains.com/issue/PY-56723/
Settings | Editor | General | Console | Default Encoding to UTF-8
If this is not the case, please provide OS info and PyCharm version along with the zipped log folder Help | Collect Logs and Diagnostic Data for further investigation.
Regards,
Bond Han
Support Engineer at JetBrains