General Setup#

Installing Python#

Please follow the Real Python website’s excellent tutorial to setup Python on your operating system.

Installing an IDE#


Now that you have Python installed, you’re going to want to write some code to run with it. Python code can be written in any editor, as long as the file is saved with a .py suffix. However, not all editors were made equal. In this course, I highly recommend using Visual Studio Code (VSCode) as your main editor, especially if you have no prior Python experience.

  • Download and install VSCode from its download page.

  • Install the Python Extension:

    • Inside VSCode press the VSC Extensions Marketplace (or Ctrl+Shift+X), search for Python and install it. or

    • From the VSC Marketplace website (here).

  • Help VSCode find your Python installation. After opening a .py file (you can create one just for this purpose), click on the yellow “Select Python Environment” button on the bottom left side of your screen and select the latest installed Python version.

Note

If you’re on a Windows machine, it’s better to change the default VSCode terminal to the command prompt. Do so by opening the bottom terminal (“View” -> “Terminal”, or Ctrl+`), click the downfacing arrow to the left of the “+” sign, click “Select default shell” in the menu and choose the command prompt (cmd). You’ll need to re-open VSCode for this change to take effect.

Installing Git#


Code is archived and catalogued using version control. The application we’ll use in this course (and by far the most popular choice) is git, complemented with GitHub, which we will use to store our archive online and share it.

  • Install git from the download page.

  • Before using it you’ll have to tell git who you are. Open a new command-line or terminal instance and write the following two commands (with the values between < > replaced):

    git config --global user.name "<MY_NAME>"
    git config --global user.email "<MY_EMAIL_ADDRESS>"
    

    This user profile will identify you whenever you make any commits in the future.