{"id":7120,"date":"2014-10-10T10:35:49","date_gmt":"2014-10-10T15:35:49","guid":{"rendered":"https:\/\/wp.stolaf.edu\/it\/?page_id=7120"},"modified":"2016-06-10T10:48:14","modified_gmt":"2016-06-10T15:48:14","slug":"installing-pil-pillow-cimage-on-windows-and-mac","status":"publish","type":"page","link":"https:\/\/wp.stolaf.edu\/it\/installing-pil-pillow-cimage-on-windows-and-mac\/","title":{"rendered":"Installing PIL\/Pillow\/cImage for Python on Windows and Mac"},"content":{"rendered":"<div data-modular-content-collection><h4><strong>What is Python?<\/strong><\/h4>\n<p>Python is a widely-used programming language used in many of the computer science classes here at St. Olaf.<\/p>\n<h4><strong>What is PIL\/Pillow?<\/strong><\/h4>\n<p>PIL (Python Imaging Library) adds many image processing features to Python. Pillow is a fork of PIL that adds some user-friendly features.<\/p>\n<h4><strong>What is cImage?<\/strong><\/h4>\n<p>cImage.py is a Python module used for image processing.<\/p>\n<h2><b>Installing Python, PIL\/Pillow, and\u00a0cImage.py<br \/>\n<\/b><b><\/b><\/h2>\n<h2><b>Windows<\/b><b><br \/>\n<\/b><\/h2>\n<ul>\n<li>Install Python 2.7.8 (64-bit &#8212; this is important)\n<ul>\n<li><a href=\"https:\/\/www.python.org\/ftp\/python\/2.7.8\/python-2.7.8.amd64.msi\">https:\/\/www.python.org\/ftp\/python\/2.7.8\/python-2.7.8.amd64.msi<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Install Python 3.4.1 (64-bit &#8212; this is important)\n<ul>\n<li><a href=\"https:\/\/www.python.org\/ftp\/python\/3.4.1\/python-3.4.1.amd64.msi\">https:\/\/www.python.org\/ftp\/python\/3.4.1\/python-3.4.1.amd64.msi<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Download and install Pillow for Python 2\n<ul>\n<li><a href=\"https:\/\/pypi.python.org\/packages\/2.7\/P\/Pillow\/Pillow-2.5.3.win-amd64-py2.7.exe#md5=33c3a581ff1538b4f79b4651084090c8\">https:\/\/pypi.python.org\/packages\/2.7\/P\/Pillow\/Pillow-2.5.3.win-amd64-py2.7.exe#md5=33c3a581ff1538b4f79b4651084090c8<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Download and install Pillow for Python 3\n<ul>\n<li><a href=\"https:\/\/pypi.python.org\/packages\/3.4\/P\/Pillow\/Pillow-2.5.3.win-amd64-py3.4.exe#md5=6ee659d7b945e826a07c53c15578424f\">https:\/\/pypi.python.org\/packages\/3.4\/P\/Pillow\/Pillow-2.5.3.win-amd64-py3.4.exe#md5=6ee659d7b945e826a07c53c15578424f<\/a> (direct link)\n<ul>\n<li><a href=\"https:\/\/pypi.python.org\/pypi\/Pillow\/\" target=\"_blank\">https:\/\/pypi.python.org\/pypi\/Pillow\/<\/a> (all other versions)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Download and install cImage\n<ul>\n<li>Download cImage.py from Github\n<ul>\n<li>Navigate to\u00a0<a href=\"https:\/\/github.com\/bnmnetp\/cImage\" target=\"_blank\">https:\/\/github.com\/bnmnetp\/cImage<\/a><\/li>\n<li>Click\u00a0<strong>cImage.py<\/strong>, and click the button labeled <strong>Raw<\/strong> to see the contents of the file.<\/li>\n<li>Click <strong>File\u00a0<\/strong>&gt;\u00a0<strong>Save Page As<\/strong> (Chrome &amp; Firefox) or <strong>File\u00a0<\/strong>&gt;\u00a0<strong>Save As<\/strong> (Safari) to save the file on your computer.<\/li>\n<li>Copy \u201ccImage.py\u201d from where you saved it to C:\\Python27\\Lib\\site-packages and C:\\Python34\\Lib\\site-packages\\<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2><b>Mac<\/b><\/h2>\n<ul>\n<li>Install Python 3.4.1 (Python 2.7 is already installed by default)\n<ul>\n<li><a href=\"https:\/\/www.python.org\/ftp\/python\/3.4.1\/python-3.4.1-macosx10.6.dmg\">https:\/\/www.python.org\/ftp\/python\/3.4.1\/python-3.4.1-macosx10.6.dmg<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Download Xcode from the Mac App Store<\/li>\n<li>Navigate to <strong>Xcode<\/strong> &gt; <strong>Preferences<\/strong> &gt; <strong>Downloads<\/strong> tab<\/li>\n<li>Click the button to install the Command Line Tools<\/li>\n<li>Open Terminal (Applications\/Terminal) and run:\n<ul>\n<li>xcode-select &#8211;install (You will be prompted to install the Xcode Command Line Tools)<\/li>\n<li>sudo easy_install pip<\/li>\n<li>sudo pip install pillow<\/li>\n<li>pip3.4 install pillow<\/li>\n<\/ul>\n<\/li>\n<li>Download and install cImage\n<ul>\n<li>Download cimage.py\n<ul>\n<li>Navigate to\u00a0<a href=\"https:\/\/github.com\/bnmnetp\/cImage\" target=\"_blank\">https:\/\/github.com\/bnmnetp\/cImage<\/a><\/li>\n<li>Click\u00a0<strong>cImage.py<\/strong>, and click the button labeled <strong>Raw<\/strong> to see the contents of the file.<\/li>\n<li>Click <strong>File<\/strong>-&gt;<strong>Save Page As<\/strong> (Chrome &amp; Firefox) or <strong>File<\/strong>-&gt;<strong>Save As<\/strong> (Safari) to save the file on your computer.<\/li>\n<li>Copy \u201ccImage.py\u201d from where you saved it to Macintosh HD\/Library\/Python\/2.7\/site-packages\/<\/li>\n<li>Copy \u201ccImage.py\u201d from where you saved it to Macintosh HD\/Library\/Frameworks\/Python.framework\/Versions\/3.4\/lib\/python3.4\/<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>What is Python? Python is a widely-used programming language used in many of the computer science classes here at St. Olaf. What is PIL\/Pillow? PIL (Python Imaging Library) adds many [&hellip;]<\/p>\n","protected":false},"author":148,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_spp_custom_css":"","footnotes":""},"class_list":["post-7120","page","type-page","status-publish","hentry"],"acf":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wp.stolaf.edu\/it\/wp-json\/wp\/v2\/pages\/7120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.stolaf.edu\/it\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/wp.stolaf.edu\/it\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/wp.stolaf.edu\/it\/wp-json\/wp\/v2\/users\/148"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.stolaf.edu\/it\/wp-json\/wp\/v2\/comments?post=7120"}],"version-history":[{"count":4,"href":"https:\/\/wp.stolaf.edu\/it\/wp-json\/wp\/v2\/pages\/7120\/revisions"}],"predecessor-version":[{"id":9267,"href":"https:\/\/wp.stolaf.edu\/it\/wp-json\/wp\/v2\/pages\/7120\/revisions\/9267"}],"wp:attachment":[{"href":"https:\/\/wp.stolaf.edu\/it\/wp-json\/wp\/v2\/media?parent=7120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}