简体   繁体   中英

Compile and Run Python program in visual studio without the Python extension

I am using Visual Studio 2019 as the text editor to write python program. I want to compile and run the program in the Visual Studio without downloading the VS python extension. I have installed Python 3.8 in the default C://Users/Dell/AppData/Local/Programs/Python/Python38 location. I do not want to download the extension because the extension installs Python 3.7 on a different location which sometimes become hard to access..

I'm going to make an assumption here that you are relatively new to the Python language. Python isn't "compiled" it's interpreted.

I'm also going to make a recommend (and I should point out that this is purely my own opinion) that you use Visual Studio Code. There is a really good guide for how to get up and running with Python. In general though:

  1. Install Python 3.7 from the official website
  2. Install VS Code
  3. Open VS Code, install the Python extension
  4. Create a new *.py file
  5. Select your python version
  6. Start editing/debugging

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM