Coding python on your own computer
Although we will always use the classroom Macs in lecture and lab, many of you may wish to use your personal laptops to work on your problem sets. In this case, you'll need to install the Canopy programming environment on your computer. Below is information on how to do this. If you encounter problems with the installation process, please post on the cs111-spring16 Google Group, and the CS111 staff and your peers will do our best to help you out.
- In the For Academics tab on the Enthought Canopy download page,
click on the Request your license button
and register with your Wellesley gmail address. Students with an academic email address
can download the Canopy environment for free. Once you are registered, click on the
sign in link, and you
will have an option to download the Canopy environment for your particular
computer platform (Mac, Windows, Linux). As of Jan 2, 2016, the download page
has buttons that allow you to select your platform:
- You can find out more about Canopy on Enthought's Canopy Main Canopy page.
Here are some tips for installing Canopy on Macs (and below, for PCs)
Macintosh 10.10.5 Yosemite
- Go to http://www.enthought.com/products/canopy/
- Click “Get Canopy”
- Click the “For Academics” tab
- Click the blue “Request your license” button
- Create an account for yourself. When you have completed the process you will be able to:
- Click “You can now download Enthought Canopy”
- Be sure to scroll down past ‘Canopy Express’ to the Canopy Full Installer
- Click “Download Canopy-1.6.1, 64-bit for Mac OSX”
- WAIT for the download to complete
- Using the Finder: Go to your Downloads folder
- Double-click canopy-1.6.1-osx-64.dmg
- When it’s done, you should be able to drag a canopy image to an image representing your applications folder. Do so.
- WAIT for it to finish.
- Now go to your applications folder and double-click Canopy
(You will need to OK a warning about applications downloaded from the internet, and you will need to OK the location for your Canopy environment. Do so.)
- If you get an error message that says something like "Canopy cannot be opened because it is from an unidentified developer" then you can fix this as follows: System Preferences > Security and Privacy > Change "Allow apps downloaded from:" to the "Anywhere" option. This should allow you to open Canopy.
- Say “Yes” to Canopy being your default Python environment.
- Click “Start using Canopy”
- Go to Preferences (under the Canopy menu) and select the Python tab.
- Set the Pylab backend to Inline(SVG) -- this is to enable graphics to work for you
- Select “Editor”. You should see two panes on the right hand side. The lower is your Python interactions pane.
- Write and run your first Python program: After the “In [1]:” prompt type ‘2+2’ and hit Enter If all is well you should see “Out[1]: 4”
Windows 10
Follow above instructions to step 7 and then start with the steps below:- Figure out if your computer is running a 32-bit or 64-bit version of Windows. Open System by clicking the Start button, right-clicking Computer and then clicking Properties. Under System, you can view the system type.
- Make sure the tab is set to “Windows” and download canopy -- you will need to select either the 32-bit or 64-bit version by clicking on the appropriate buttons. (Here is the generic download page). Keep track of where it’s downloaded to. If you do not set anything, it should show up in your downloads folder.
- Let the download complete.
- Navigate to your downloads folder or wherever you saved your download.
- Double-click canopy-1.6.1-win-64.exe (or canopy-1.6.1-win-32.exe). A Setup Wizard should open.
- Click next through the Setup Wizard, agreeing to license terms as prompted, until Canopy is installing.
- Let the installation complete.
- Finish and allow Canopy to launch (“Launch Canopy when setup exits.”) (You will need to OK the location for your Canopy environment.)
- Say “Yes” to Canopy being your default Python environment and start.
- Log in using the credentials created in steps 1-7.
- In the bar up top, mouse over “Edit” and click on “Preferences.”
- In the window that opens, select the Python tab. Set the Pylab backend to Inline(SVG) -- this is to enable graphics to work for you. Close the window when you are done.
- Select “Editor”. You should see two panes on the right hand side. The lower is your Python interactions pane.
- Write and run your first Python program: After the “In [1]:” prompt type ‘2+2’ and hit Enter If all is well you should see “Out[1]: 4”
- NOTE: if you see an error message that says: "This installation package is not supported by this processor type. Contact your product vendor." -- that typically occurs when the 64-bit canopy install is run on a 32-bit Windows system. So this means you should go back to step 2 above and select the 32-bit Windows version to download.