PFP – SET UP THE ENVIRONMENT
I.. Set up the Visual Studio Code environment:
1. Install the Visual Studio Code: [Link] (Click Download for Windows).
2. Install the Python extension for VS Code from the Visual Studio Marketplace. For additional
details on installing extensions, see Extension Marketplace. The Python extension is
named Python, and Microsoft publishes it.
([Link]
3. Install a Python interpreter. ([Link]
4. Verify the Python installation. (py -3 –version)
5. Start VS Code in a project (workspace) folder.
- Create by Explorer
- Create by command line
6. Select a Python interpreter.
- Click “View” -> “Command Pallete…” or press “Ctrl + Shift + P”
- Type Python: Select Interpreter
- Select command
7. Create a Python Hello World source code file.
8. Run Hello World.
There are three ways to run a python file in VSS:
- Right-click anywhere in the editor window and select Run Python File in Terminal (which
saves the file automatically)
- Select one or more lines, then press Shift+Enter or right-click and select Run
Selection/Line in Python Terminal. This command is convenient for testing just a part of a
file.
- From the Command Palette (Ctrl+Shift+P), select the Python: Start REPL command to
open a REPL terminal for the currently selected Python interpreter. In the REPL, you can
then enter and run lines of code one at a time.
Reference: [Link]
II. Set up the Google Colab:
1. Enter the Google Colab: [Link]
2. Mounting drive
- Click “Tool” -> “Command Pallette” or “Ctrl + Shift + P”
- Type “m” and select “Mount Drive”
- Click Run cell to mount the drive
3. Listing drive content
4. Create a [Link] file on your local disk.
5. Upload the file on the drive.
6. Run the [Link] file