Setting up Python
There are three sets of instructions for completing this lesson: a quick start, a detailed written guide, and a movie. Choose the one that works best for you, and then move on to lesson 2 when you are ready.
Quick start guide
- Download the free Canopy Express from https://store.enthought.com
- Use the package manager to install pandas
- From the Tools dropdown menu, click Canopy Terminal and type pip install epipy
- From the Editor, go to File -> New -> Jupyter (IPython) Notebook
For this course we will use the Enthought Canopy distribution of Python. You can think of Canopy a bit like using a browser to access the internet - it's a useful portal into the Python ecosystem. Canopy is free and easy it use. It does not require administrator rights to install, so even if you are on a work computer you should be able to install it yourself.
To get started, visit https://store.enthought.com and click the Free Download under the Canopy Express column (hint: it's the left-most column). On that page that opens, selected Download Canopy, and the download should begin. It is a fairly large file and will take a few minutes to download.
When that is complete, open the package and follow the steps on the setup wizard. When it asks if you'd like to make Canopy your default Python installation, go ahead and click yes.
After Canopy is installed, open it from Applications (Canopy, if you are on a Mac) or your start menu (Enthought Canopy, on Windows). The window that opens will be the home window every time you start Canopy. We will start by selecting the Package Manager to install the add-ons we need to make Python work for us.
If you're on a Mac and you get a security error after trying to open Canopy, you'll have to change your security settings to allow programs downloaded from the internet. Open System Preferences from your Applications menu, and click on Security & Privacy in the top row. Select the General tab, and click the lock in the bottom left corner to allow changes to be made to your settings. Then change the "Allow apps downloaded from" section to "anywhere" and click the lock again to save the change. Resume opening Canopy from your Applications.
When the Package Manger opens, type pandas into the search bar in the upper left corner. Click the top pandas option in the results to install. You will only need to install pandas once, but you may need to access the Package Manager again to add additional packages as you need them. For now, close the Package Manager and navigate back to the Canopy home window.
Instead of working in a plain text code editor, we're going to use the IPython Notebook. The Notebook allows us to keep our code, notes, graphs, tables, and other output together in one window. It's easy to work with, looks great, and can be shared with colleagues. To open a new notebook, from the Canopy home window select Code Editor. Then go to File -> New -> Jupyter (IPython Notebook). A new Notebook window will open in your browser. You can dismiss the alert message that pops up.