程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Vscode Python running environment configuration

編輯:Python

background
Created a python Virtual runtime environment for , for instance tensoflow, Want to be in VS Code Run debugging under .

step

Refer to instructions :https://blog.51cto.com/u_15127658/2783413
(1) download VS Code
(2) install Python plug-in unit

See the previous instructions for creating a virtual environment . By default, it has been created .
stay VS Code For in the python Program management does not VS Medium engineering 、 Concept of solution , But there are similar things to refer to .
(3) Will include python File folder add python in . As shown in the figure below :
Be careful ,

(4) choice Python Interpreter
Python It's an interpretive language , In order to be able to run Python Code , We need to tell VisualStudio Code Which one to use Python Interpreter .

start-up vscode, adopt Ctrl+Shift+P Open the command panel , Then type and execute Python:Select Interpreter command .

Pictured above ,vscode All available... On the current machine are automatically listed Python Interpreter . among , The suffix is (’base’:conda) Yes. Anaconda Of Python Interpreter .

Select an applicable python.exe after ,vscode Will python.exe The path to is stored in the workspace settings . Located at the root of the project .vscode In the folder settings.json file . You can also modify it directly python.pythonPath This path .
Here's the picture ,:

enter after , Select the corresponding folder .

Press Enter after , Select the corresponding virtual environment .

(5) Running environment settings , Choose your own project .
Then a configuration file will be created launch.json, Here's the picture .

You can click Run python Procedure !!!


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved