在 Windows 10 中,如何配置 Visual Studio Code 以查找 Python 3 解释器? [英] in Windows 10, How to configure Visual Studio Code to find the Python 3 interpreter?

查看:37
本文介绍了在 Windows 10 中,如何配置 Visual Studio Code 以查找 Python 3 解释器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Windows 10 中,应如何配置 Visual Studio Code 以查找 Python 3 解释器?

Visual Studio Code 无法找到 Python 3 解释器.

我添加了 Python 扩展,Python 扩展位于

In Windows 10, How Visual Studio Code should be configured to find the Python 3 interpreter?

Visual Studio Code is not able to find the Python 3 interpreter.

I have added the Python extension, the Python extension at https://marketplace.visualstudio.com/items?itemName=donjayamanne.python.

How settings.js should be changed to use Python?

Even if python.pythonPath in settings.js is changed to be led to python.exe, which is at "C:\Users<User>\AppData\Local\Programs\Python\Python36-32\p‌ython.exe", if I select Python: Select Workspace Interpreter in the command palette, I get the message Please open a workspace to select the Python Interpreter. Why is this happening?

解决方案

macOS

VSCode -> Preferences -> Settings -> scroll down to Python Configuration.

Click the pencil on the left of the configuration you'd like to use and click Copy Settings.

"python.pythonPath": "python3.6"

这篇关于在 Windows 10 中,如何配置 Visual Studio Code 以查找 Python 3 解释器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆