The Terminal, also sometimes called the Command Line or the Command Prompt on Windows, is a text-based interface for operating your computer. We'll be using it a bit throughout the semester in order to run our programs, so make sure you know how to open the Terminal on your computer. This website explains how to find the Terminal application on your computer, as well as some further details on what you can do with it. You don't need to worry too much about those details just yet, although you're free to peruse them if you'd like. As we go through the semester, we'll explore the capabilities of the terminal in much greater depth.
In order to be able to run Python programs on your computer, you need
to install a Python Interpreter. An interpreter is a program
that is capable of reading a .py
file that you have
written, and translating the Python code in that file to instructions
that your computer can easily execute. Begin by downloading Python using
the installers below.
Note: Even if you have previously installed
Python before, you should go through this installation process to make
sure that you have exactly the right version of Python installed that is
required for this class.
Note: Macs come with a version of Python installed, but this is an older version of Python (specifically, Python 2). CS5001/CS5003 requires the use of Python 3, so make sure to follow these instructions even if you think you already have Python installed. If you require the use of Python 2 for other work, you can still install Python 3, which exists alongside Python 2 rather than replacing it.
python3
and press enter. You should see something
that looks like this:
Python 3.7.3 (default, Mar 27 2019, 09:23:15)
[Clang 10.0.1 (clang-1001.0.46.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
py
and press enter. You should see something that
looks like this:
Python 3.7.3 (v3.7.3:9a3ffc0492, Mar 27 2019, 09:23:15)
Type "help", "copyright", "credits" or "license" for more information.
>>>
To get started, download and install the community version of PyCharm:
.dmg
file and drag PyCharm into
your Applications folder)
.exe
file and install PyCharm,
using all the default options. )
Now that you have PyCharm downloaded and installed, open it up and follow the setup wizard, which allows you to choose some default settings. Feel free to install any additional plugins it suggests, although none will be necessary for this class.
PyCharm models a program as a 'project', which consists of one or more Python files, as well as any additional resources like images or text files. To get you familiar with working with projects in PyCharm, we've provided a sample project, which you can download here. To test out this project, and to gain familiarity with the PyCharm environment, download the sample project, and unzip it (it will probably unzip into your Downloads folder in your home directory). Then, open it in PyCharm (using the 'open' option on the first screen). Make sure to open the folder that is called pycharm_intro.
See the demo video below to show how to open the project and configure it for your system: