B. Building the Pre-Configured Development Environment

The development environment used in this course is designed to be used by simply downloading and extracting the zip file.

This page describes how to build this development environment in case you want to troubleshoot a problem, customize some details, or build a similar environment on an OS other than the one we are assuming (Windows 64 bit).

B.1. Prerequisite

  • Windows 10 or later (64 bit)

B.2. Downloads

B.3. Installation

  • Create C:/cs1 (referred to as ${CS1_DIR} below)
  • Create an empty folder ${CS1_DIR}/home
  • Create an empty folder ${CS1_DIR}/projects
  • Execute Winpython64-3.10.5.0dot.exe and rename the resulting folder WPy64-31050 to ${CS1_DIR}/WPy64 (referred to as ${WinPy})
  • Create an emtpy folder ${CS1_DIR}/MinGit (referred to as ${MinGit}) and put the contents of MinGit-2.37.3-64-bit.zip into this
  • Create an emtpy folder ${CS1_DIR}/VSCodium-win32-x64 (referred to as ${VSCodium}) and put the contents of VSCodium-win32-x64-1.71.1.22256.zip into this [1]
  • Put the following files
    • ${CS1_DIR}/vscode_cs1.bat
    • ${CS1_DIR}/command_prompt_cs1.bat
    • ${CS1_DIR}/home/.gitconfig
    • ${CS1_DIR}/home/.config/git/ignore
    • ${WinPy}/settings/winpython.ini
    • ${VSCodium}/data/user-data/User/settings.json
  • Execute the following commands in the Command Prompt spawn by command_prompt_cs1.bat
    • pip install pygame
    • pip install pylint
    • pip install flake8
    • pip install ipython
    • pip install pytest
    • pip install pytest-watch
    • pip install rope
    • pip install ipykernel
  • Execute vscode_cs1.bat to run VSCode. Open Extensions side bar [2] and install the following extensions.
    • Python (ms-python.python)
    • Git Graph (mhutchie.git-graph)
    • Python Indent (kevinrose.vsc-python-indent)
    • Highlight (fabiospampinato.vscode-highlight)
    • Japanese Language Pack (ms-ceintl.vscode-language-pack-ja)
      • Japanese Language Pack is installed because many of the students taking this course speak Japanese. However, because this textbook assumes the English user interface, open Command Palette and run Configure Display Language to choose en.
  • Open an arbitrary Python file in VSCode
    • then the extensions Jupyter and Pylance are automatically installed.
[1]VSCodium.exe may be deleted by security software (McAfee Livesafe has made this happen). Specify that you want to exclude it from deletion.
[2]If you cannot connect to the market place, open ${VSCodium}/data/argv.json and add a line "enable-browser-code-loading": false. VSCodium needs to be restarted.

B.4. Preparation of Distribution File

After operation check, follow the steps below to delete the history information, cache, etc., and then zip the entire cs1 folder.

  • Make sure ${CS1_DIR}/home/.gitconfig does not include personal information
  • Back up ${VSCodium}/data/user-data/User/settings.json
  • Quit VSCode, delete ${VSCodium}/data/user-data/, and restore ${VSCodium}/data/user-data/User/settings.json