[英]VS Code Python installation and Python Interpreter not recognized (Anaconda)
I am getting this message on the VS Code that "Python is not installed. Please download and install python before using the extension."我在 VS 代码上收到此消息“未安装 Python。请在使用扩展程序之前下载并安装 python。” There is also the "Select Python Interpreter" on the bottom left hand side of VS Code.
VS Code 左下角还有“Select Python Interpreter”。
Ps: I installed Python through Anaconda ps:我通过Anaconda安装了Python
Select Python Interpreter Select Python 解释器
Proof that path is correct for python.exe证明 python.exe 的路径是正确的
I do have Python and Python extension installed which works within the VS Code terminal.我确实安装了 Python 和 Python 扩展,它们在 VS Code 终端中工作。
Working Python in VS Code Terminal在 VS Code 终端中工作 Python
Thank you in advance for your help..预先感谢您的帮助..
what you can do is click on enter an interpreter path
and then click Find
and select the python.exe
file manually.您可以做的是单击
enter an interpreter path
,然后手动单击Find
和 select python.exe
文件。 that will create a .vscode
folder with the settings.json
file.这将使用
settings.json
文件创建一个.vscode
文件夹。 and as the conda
environment (base) is active, you can just write python3 main.py
to run the file.并且由于
conda
环境(基础)处于活动状态,您只需编写python3 main.py
即可运行该文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.