.. _mac-install: ********************************* Install Python On Mac ********************************* .. _mac-installing-python: Installing Python -------------------- Great news! You're already done with this step. By default, the current Mac OS X has Python 2.7.5, but earlier versions of Mac OS X, with slightly earlier versions of Python, are fine. .. _mac-getting-the-modules: Getting The Python Modules --------------------------- One of the wonders of modern programming is that writing sophisticated programs is often quite easy by making use of work others have already done. In Python, this comes in the form of third-party modules that we will download and import for use by our own programs. For example, if you want to open some images to crop and stretch and cut and paste together, you don't need to write a program that interprets a `.jpg` file, as someone has already done that, you just have to **import** their code. As such, you will now want to install all of the wonderful modules written and maintained by outside sources that we will be using. **These *DO NOT* come on Mac OSX, so you'll need to download an installer:**: * Find your version of OSX and install command line tools. You can find this by clicking the Apple icon in the navigation bar and selecting 'About This Mac'. * 10.9 Mavericks - Open Terminal. Run the command "xcode-select --install". Continue by hitting Install. Wait for the installer to complete.`_ * 10.8 Mountain Lion - Run `Command Line Tools for Mountain Lion <../_static/python_environment/command_line_tools_10_8.dmg>`_ * 10.7 Lion - Run `Command Line Tools for Lion <../_static/python_environment/command_line_tools_10_7.dmg>`_ * 10.6 Snow Leopard and below - For now, please use :ref:`vm-install`. If you would like to run natively, please email TA Jason Parham at parhaj@rpi.edu. * Run `libpng and libjpeg Installer <../_static/python_environment/libjpeg-libpng.dmg>`_ * Run the `Module Installer <../_static/python_environment/csci1100-mac-python-installer.pkg>`_ To reset/uninstall the modules, run `Module Reset <../_static/python_environment/reset.command>`_ Once you click on `reset.command` you will have to put in your computer password and hit `Enter`. Be aware that it will not show the keystrokes as you type your password. This installer will add all of the modules that we will need for the entire semester. You will start to learn how to use these modules in the coming weeks and months. Once this installer has completed, you may delete the installer folder from your computer. **If you encounter an error, the first thing you should do is check Piazza to see if your error has already been solved. If it has not, please email TA Jason Parham at parhaj@rpi.edu.** For OS X 10.7* users only, this installer might fail due to a security feature, called *Gatekeeper*. The way to fix this is to temporarily disable this security feature, install the software, then re-enable the security feature. If the installer fails, please follow the following instructions: * Click the Apple icon in the menu bar and select *System Preferences*. * Go to *Security & Privacy* --- It is located in the first row, which is entitled *Personal*. * Click on the *General* tab. * *Authenticate*: Click on the lock at the bottom-lefthand corner of the screen and subsequently input your computer user account password. * In the bottom half of the 'General' tab, there will be the following choices: * Allow applications downloaded from: * \( \) Mac App Store * \(X\) Mac App Store and identified developers * \( \) Anywhere * Select *Anywhere* and select *Allow From Anywhere* in the subsequent dropdown warning. We will be re-enabling this feature after the installer is completed. * Install the software package. * Once the installer has completed, go back to the *System Preferences* window and re-select the option * Allow applications downloaded from: * \( \) Mac App Store * \(X\) Mac App Store and identified developers * \( \) Anywhere * This will return the security settings back to normal. * Close *System Preferences* window. .. _mac-go-back: Go Back And Get The IDE And Dropbox ------------------------------------ Now, go back and get everything else you need :ref:`getting-the-ide`