Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

in Windows 10, How to configure Visual Studio Code to find the Python 3 interpreter?

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>AppDataLocalProgramsPythonPython36-32p?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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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"

enter image description here

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...