COSC 1336 | PyThon

ACC

Downloading & Installing Python

Foreword

When learning a new programming language, it is a good idea to obtain some experience working with command line tools for that language. To accomplish this, we will begin by downloading and installing the latest version of Python. Then, we will write a few minor programs using the Python interpreter from the command line before proceeding to use the PyCharm IDE in subsequent chapters.

Download Python

Navigate to the Python site to download the latest version of Python. Select the latest version in the download section.

 

I'm using Windows so I chose the file highlighted. Choose the correct file for your installation.

 

Double-click the executable that was downloaded to your download location. I download to the desktop and the .exe looks like this:

 

Install Python

First, select the Add Python 3.5 to PATH option shown at the bottom of the dialog. Then, select Custom Installation.

 

Leave all items here selected and then click Next.

 

I recommend installing for All Users in case you log in as a different user. Also, I strongly recommend that you install Python directly to C:\ as shown below. In my experience, there are fewer configuration issues when development tools are installed directly to C:\. Select Install.

 

Installation only requires ~1 minute. You are encouraged to browse both the online tutorial and the documentation at the links in the dialog. Bookmark those links.

 

Now let's confirm that Python was installed successfully. Open a command prompt and type python to see the following. Seeing a Python prompt (>>>) confirms that the interpreter is running. By selecting Add Python 3.5 to the PATH which we did in a dialog above, we can run python from any directory on the computer and not just from where the python.exe executable resides.