本文介绍了python无法在VS Code上加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在Djangon/Python中进行开发,并一直使用Sublime Text.我想谈一个更完整的想法(控制台,调试等)所以我安装了VS Code,但是当我打开Django/Python项目时,当我想安装python扩展名时却出现了以下错误,但是却出现了以下错误:

I develop in Djangon / Python recently and use until now Sublime Text.I would like to go to a more complete idea (console, debug, etc ...)so I installed VS Code but when I open a project Django / Python I have the error below when I wanted to install the python extension but I had the error below:

当我查看PATH环境变量时,看不到引号,而是两行:

when I look at the PATH environment variable I do not see quotes but 2 lines:

C:\ Users \ jl3.PRT-063 \ AppData \ Local \ Programs \ Microsoft VS Code \ bin

C:\Users\jl3.PRT-063\AppData\Local\Programs\Microsoft VS Code\bin

我决定遵循VS Code Python教程,实际上,当我运行程序"Hello world!"时,我收到以下错误消息:

I decided to followed the tutorial VS Code Python and actually when I run the program "Hello world!" I have the error message below:

当我在Windows控制台上运行django项目时,我使用py而不是python ...我不知道为什么,并且是由我来设置VS Code的是使用python ...也许是问题的根源

When I run my django project with windows console, I use py instead of python... I don't know why and if it is me that set this VS Code use python...maybe it is the origin of the problem

有人可以帮我吗?

推荐答案

您实际上是在使用Code Runner执行代码,而不是使用Python扩展名(您可以通过 [Running] 位来分辨).如果您希望Python扩展程序执行该操作,请为您的Python工作区禁用Code Runner或将其卸载.

You are actually executing code using Code Runner, not the Python extension (you can tell by the [Running] bit). If you would like the Python extension to do the execution then either disable Code Runner for your Python workspace or uninstall it.

这篇关于python无法在VS Code上加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 17:18