[英]Add Python 3.7 to Pycharm
I'm trying to add another version to my PYcharm editor (currently running python 3.8) and for some reason i can't do that, although i think i'm not doing anything wrong.我正在尝试向我的 PYcharm 编辑器(当前运行 python 3.8)添加另一个版本,但由于某种原因我不能这样做,尽管我认为我没有做错任何事情。 Here's my steps.
这是我的步骤。
Settings -> Project Interpreter -> Settings -> Add -> System Interpreter -> Base Interpreter -> ...
another variation that i tried without success:我尝试过的另一个变体没有成功:
Settings -> Project Interpreter -> Settings -> Add -> Virtualenv Environment -> Base Interpreter -> ...
Here's the path to python 3.7 file:这是 python 3.7 文件的路径:
C:\Users\********\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.7\Python 3.7 (32-bit).lnk
I have renamed it to the following but still didn't work我已将其重命名为以下内容,但仍然无效
C:\Users\********\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.7\Python.exe
For reference here's my python 8 path供参考,这是我的 python 8 路径
C:\Users\********\AppData\Local\Programs\Python\Python38-32\python.exe
different location, but it shouldn't matter.位置不同,但应该没关系。
Any help will be much appreciated.任何帮助都感激不尽。
What you have added is not the exe, it's just the shortcut ( .lnk
) file to the exe.您添加的不是 exe,它只是 exe 的快捷方式 (
.lnk
) 文件。 So even though you renamed it, that will not work!所以即使你重命名了它,那也行不通! What you can do is you can right-click and select
Open file location
and get the real exe pathname and add it to Pycharm.您可以做的是您可以右键单击并 select
Open file location
并获取真正的 exe 路径名并将其添加到 Pycharm。
Steps with pictures:带图片的步骤:
Get the real Python exe path获取真正的Python exe路径
Right-click on the
Python 3.7
shortcut右键单击
Python 3.7
快捷方式 After that, it will show you the real exe path.
之后,它将向您显示真实的 exe 路径。 For example, my Python 3.7 is in VS dir.
例如,我的 Python 3.7 在 VS 目录中。
After that you can do like what you did:之后,您可以像以前那样做:
Settings -> Project Interpreter -> Settings -> Add -> System Interpreter -> Base Interpreter ->... (Sorry but I can't take screenshots for this step. Do what you did and it should be ok.) Settings -> Project Interpreter -> Settings -> Add -> System Interpreter -> Base Interpreter ->... (抱歉,我无法为这一步截屏。按照您的操作进行操作,应该没问题。)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.