Software for CompSci 101 Spring 2015
Note: These instructions are from Fall 2014 so may be slightly
differently.
In order to write programs, you will need some other programs. These allow you to edit your program, translate it into a simpler representation that your computer can understand, and run it. These initial steps may seem a little overwhelming, but they only need to be done once to get things started and working together. This process make take approximately 30 minutes to complete.
You will need to install five things in this order: Java, Eclipse,
Python, PyDev and Ambient.
This
video of Prof. Astrachan installing PyDev and Ambient in Fall 2014
When installing these programs, unless otherwise noted, we suggest you simply follow the default installation options.
- install Java (so you can run the Eclipse program)
- Install Java version 8 which is called Java SE 8u25 (as of
January 2015)
from
here.
Click on "JDK download", then click on the version for the type
of machine you have for Java SE Development Kit 8u25 .
- double-click the resulting file and follow the default options to install it
- install Eclipse (an environment for writing and running your software programs)
- select the first option, "Eclipse IDE for Java Developers 4.4.1
(nicknamed Eclipse Luna)", for your operating system from here
- choose the 32- or 64-bit version to match the version of Java installed
- Eclipse is not packaged with an installer; simply unarchive it and move the entire "eclipse" folder to C:\ (Windows) or to Applications (Mac)
- You don't need to run Eclipse yet.
- install Python (so you can run the programs you write)
- the latest version of the Python language is 3.4, but we will
use Python 2.7 for this class
- the distribution we will be using is called Canopy and has a number of bundled packages that will be useful during the semester
- select "Canopy 1.5.1"
for your operating system
from here
- choose the 32- or 64-bit version to match your particular version of Java and Eclipse
- double-click the resulting file and follow the default options to
install it. You will be asked if you want to make Canopy your
default Python Environment, select Yes.
- run Canopy, select the default location for it to install Python, and then quit the program;
assuming you use Eclipse throughout the rest of the semester, you will not need to run it more than just this once
- install the PyDev plugin from within Eclipse (so you can use Eclipse to develop your Python programs)
- go into the eclipse folder and click on "eclipse" (may see a dark
blue circle) to start it. The first time you start eclipse, you will
be asked to a workspace folder where you will put all your work for
this class. There will be a default folder path. Note where it is and
click ok.
- Access the Help menu
- select "Install New Software..."
- in the "Work with:" text field, type "
http://pydev.org/updates
" and press Enter
- you may need to wait up to a minute until the "Pending..." is replaced by "PyDev" and "PyDev Mylyn Integration (Optional)"
- select only "PyDev" (by checking the box next to it) and click "Next >" down at the bottom
- follow the next steps to finish the installation using the defaults and agreeing to the terms and conditions;
if you receive a warning about unsigned content, proceed anyway
- at the end, agree to restart Eclipse for changes to take effect
- connect Eclipse to your version of Python (so you can run Python programs within Eclipse)
- open Eclipse and access the Preferences Box (under Window>Preferences on Windows or Eclipse>Preferences on Mac)
- choose "Pydev" and "Interpreter " and then "Python Interpreter" from the sidebar
- press the "New ..." button to tell Eclipse about Python
- in the resulting dialog box, for the "Interpreter Name" type "Canopy" and for the "Interpreter Executable" type
- for Windows:
"
C:\Users\UUU\AppData\Local\Enthought\Canopy\User\python.exe
"
where UUU is your user name on your machine
- for Mac: "
/Users/UUU/Library/Enthought/Canopy_VVV/User/bin/python
"
where UUU is your user name on your machine and VVV is the remainder of the directory name (which depends on which version you installed; you should be able to find the right one by browsing to it)
- choose "Select All" and then click "OK" at the bottom of the resulting dialog box
- click "OK" at the bottom of the Preferences Box and wait for the changes to take effect when the dialog box to close (you do not need to restart Eclipse)
- Last step: change eclipse to python mode by selecting
"Window" then "Open perspective" and then
"other" and select PyDev.
In the top right corner of
eclipse you should see PyDev appear.
- You should now be ready to create a Python program
- install the Ambient plugin from within Eclipse (so you can download and submit files for class)
- open Eclipse and access the Help menu
- select "Install New Software..."
- in the "Work with:" text field, type "
http://www.cs.duke.edu/csed/ambient/update
" and press Enter
- you may need to wait a number of seconds until the "Pending..." is replaced by "Ambient" in the main selection area
- select "Ambient" and click "Next >" down at the bottom
- follow the next steps to finish the installation using the defaults and agreeing to the terms and conditions;
if you receive a warning about unsigned content, proceed anyway
- at the end, agree to restart Eclipse for changes to take effect