简体   繁体   English

为什么 VSCode 说 Python 没有安装?

[英]Why does VSCode say Python is not installed?

When I open up my VSCode, I immediately get the message "Python is not installed. Please download and install Python before using the extension."当我打开我的 VSCode 时,我立即收到消息“未安装 Python。请在使用扩展之前下载并安装 Python。” in the bottom right.在右下角。

When I close VSCode and open it up again, the error message is fixed and it says Python 3.10 in the bottom right.当我关闭 VSCode 并再次打开它时,错误消息已修复,右下角显示 Python 3.10。 But why didn't it work in the first place?但为什么它一开始就不起作用?

I've tried uninstalling and reinstalling both Python and VSCode, but it still does this.我已经尝试卸载并重新安装 Python 和 VSCode,但它仍然这样做。 Is there anything else that I can do to solve this problem?我还能做些什么来解决这个问题吗?

This may be caused by python extension version.这可能是由 python 扩展版本引起的。

You can try switching to pre-release version.您可以尝试切换到预发布版本。

在此处输入图像描述

Can you check if the python path is added to your environment variables.你能检查一下python路径是否被添加到你的环境变量中。 Also did you install python separately, if you do then there is a small checkbox during installation that you need to tick to add python path to environment variables你也单独安装了python,如果你这样做了,那么在安装过程中有一个小复选框,你需要勾选以将python路径添加到环境变量

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么 vscode 上的 jupyter notebook 总是说没有安装 Python? - Why does jupyter notebook on vscode always say not Python is installed? 为什么Python会说文件不存在? - Why does Python say file does not exist? 为什么即使安装了 FBX 模块也找不到? - Why does it say FBX module not found even though it is installed? 当只有 3 个参数时,为什么 python 说有 4 个参数? - Why does python say there are 4 arguments when there are only 3? 为什么 python 说“没有名为 os 的模块”? - Why does python say, “no module named os”? 为什么 Python 会说某个值不存在时明确表示它不存在? - Why does Python say that a value does not exist when it specifically does? 如果 venv 文件夹安装在子目录中,为什么 VSCode 不会检测到 venv? - Why does VSCode not detect venv if the venv folder is installed inside a subdirectory? 为什么在使用Tkinter时Python会说未定义“ App”? - Why does Python say that 'App' is not defined when I use Tkinter? 为什么 SQLite (Python) 说“ORGANIZATION”表已经存在? - Why does SQLite (Python) say that the table "ORGANIZATION" already exists? Python:为什么它说我的文件未打开才能读取? - Python: Why does it say that my file is not open to read it?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM