.. _linux-install: ********************************* Install Python On Linux ********************************* .. _linux-installing-python: Installing Python -------------------- Most flavours of Linux come with Python. We will be using Python 2.7.5 in this class. If you have an older version of Linux, you may have an older version of Python. In fact, the version that comes with Ubuntu and that is located in the Ubuntu repositories is 2.7.3. This should be good enough. If you're not sure, open a terminal and type in:: $sudo apt-get install python And you will be prompted to install or upgrade to the latest version in the repository. apt-get is the default package management program for Ubuntu/Debian/LinuxMint. If you are using a different flavour of Linux, you'll need to replace the ``apt-get`` bit with your package management program. For example, if you're using Fedora you'll use ``yum``. .. _linux-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 with your Linux installation, so you'll need to open up a terminal and type in:: $sudo apt-get install python-pip This gets the python package management program pip. We'll need this for just one of the packages, but you could probably install them all using this. Next, type in:: $sudo apt-get install python-nose libjpeg62 libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev python-imaging python-sphinx python-oauth2 python-simplejson python-tk python-imaging-tk imagemagick This gets most of the python modules that you'll need for the semester. You'll want one more:: $sudo pip install flickrapi There is a flickr api module in the Ubuntu repositories, but it is different than this one, and this is the one we'll be using. Now you should have 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. .. _linux-go-back: Go Back And Get The IDE And Dropbox ------------------------------------ Now, go back and get everything else you need :ref:`getting-the-ide`