Python with Visual Studio setup instructions

## Installing and configuring Python and an editor on your machine

ONLY do this if you're on your own machine, not on the lab machines!

### Installing Python on your machine

While an editor is used for writing Python programs, all programs must be run (or "executed") by the computer. In order for the computer to be able to understand what your written code means, it needs to be able to understand the Python language.

In this class we will be using Python 3, specifically the Anaconda distribution of Python 3.5.

To install it on your computer:

Go to

* Click the download button on the homepage for Python 3.5 for whichever of Windows or Mac you have

* Open the downloaded file, and click Agree until the installation starts

### Installing and configuring VS Code editor on your machine

Go to and click on the download button in the top right.

> * Select the OS X download option for Mac, or the Windows download option for a Windows machine.

> * After clicking this, you can find the download in the Downloads folder

Now that you have downloaded the editor, we have to teach the editor how to read and nicely format Python.

#### Installing the Python plug-in for VS Code

> * Open VS Code, and be on the main page with a tool bar of 5 icons on the left.

* Click on the bottom icon, which looks like a square within a square.

* Search Python, and install the plug-in by Don Jayamanne.

* Now, after saving any file in VS Code with .py at the end, you can now write with Python syntax that

the editor understands.

### Running Python Files

We discuss this in considerably more detail in the first lab, but the key thing to remember is that you will need a terminal/shell program of some sort.

In brief:

1. Open Terminal (Mac); open ConEum (if you have install it) or Command Line (Windows)

2. Use cd to navigate to your workspace folder, containing all of your Python projects

3. Run any saved file by executing python ./

-- tanyabw - 2016-08-22

Edit | Attach | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 2016-08-22 - 18:32:09 - Main.tanyabw
Copyright 2016 The Board of Trustees
of the University of
Helping Women Faculty Advance
Funded by NSF