<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Endlessly Curious &#187; How To</title>
	<atom:link href="http://www.endlesslycurious.com/category/misc/how-to/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.endlesslycurious.com</link>
	<description>by Daniel Brown</description>
	<lastBuildDate>Thu, 03 Jun 2010 16:53:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Installing MatPlotLib on Snow Leopard with MacPorts</title>
		<link>http://www.endlesslycurious.com/2009/12/08/installing-matplotlib-on-snow-leopard-with-macports/</link>
		<comments>http://www.endlesslycurious.com/2009/12/08/installing-matplotlib-on-snow-leopard-with-macports/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 09:00:13 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[HowTo]]></category>

		<guid isPermaLink="false">http://www.endlesslycurious.com/?p=1357</guid>
		<description><![CDATA[I have been trying to install the excellent MatPlotLib graphing module for the Python programming language on my iMac for a while now. Unlike most python module installations I&#8217;ve done the excellent python SetupTools (a.k.a easy_install) has not been up to the task.  So I ended up using MacPorts (version 1.8.1) to get MatPlotLib (version 0.99.1.1) installed on Snow [...]]]></description>
			<content:encoded><![CDATA[<p>I have been trying to install the excellent <a href="http://matplotlib.sourceforge.net/index.html">MatPlotLib</a> graphing module for the <a href="http://www.python.org/">Python</a> programming language on my iMac for a while now. Unlike most python module installations I&#8217;ve done the excellent python <a href="http://pypi.python.org/pypi/setuptools">SetupTools</a> (a.k.a easy_install) has not been up to the task.  So I ended up using <a href="http://www.macports.org/">MacPorts</a> (version 1.8.1) to get MatPlotLib (version 0.99.1.1) installed on <a title="Apple.com" href="http://www.apple.com/macosx/">Snow Leopard</a> (OS X 10.6.2) with X-Code (3.2.1 &#8211; 1613).</p>
<p>So here is a brief description of how to do it:</p>
<ol>
<li>Install the <a href="http://developer.apple.com/tools/xcode/">X-Code</a> developer tools (for GCC, make and other build tools) from your Snow Leopard installation DvD.</li>
<li>Install the <a href="http://en.wikipedia.org/wiki/X_Window_System">X11</a> Window System from your Snow Leopard installation DvD.</li>
<li>Run &#8216;<a href="http://www.apple.com/softwareupdate/">Software Update</a>&#8216; from the apple menu on your Mac to get the latest X-Code updates.</li>
<li>Download the latest MacPorts installer (.dmg file extension) for Snow Leopard from here: <a title="Mac Ports" href="http://distfiles.macports.org/MacPorts/">http://distfiles.macports.org/MacPorts/</a>.</li>
<li>Mount the installer image file (.dmg) and run the contained MacPorts installer (.pkg).</li>
<li>Once installation is complete open a terminal window from Applications-&gt;Utilities-&gt;Terminal.</li>
<li>Type &#8216;<span style="color: #008000;">port</span>&#8216; at the terminal then press enter to run MacPorts.  You should see output like the following if it installed correctly:<br />
<span style="color: #808000;">MacPorts 1.8.1<br />
Entering interactive mode&#8230; (&#8220;help&#8221; for help, &#8220;quit&#8221; to quit)</span><br />
Then type &#8216;<span style="color: #008000;">quit</span>&#8216; then press enter to exit port&#8217;s interactive mode.</li>
<li>Type &#8216;<span style="color: #008000;">sudo port selfupdate</span>&#8216; and press enter to update MacPorts to the latest version.  You will be asked to enter the administrators password before continuing.  Depending on how new the version you downloaded is, MacPorts may do some upgrading.</li>
<li>Once the update is finished type &#8216;<span style="color: #008000;">sudo port install py26-matplotlib</span>&#8216; and press enter.  This will attempt to install the latest version of matplotlib for Python version 2.6.*.   You may be asked to enter the administrators password before continuing.  MacPorts will now download, configure, build and stage the dependencies needed to build the latest matplotlib for Python 2.6.  This took at least thirty minutes on my iMac and involved lots and lots of scrolling text output from the build process.</li>
<li>Next we need to switch our environment to use version 2.6.* of Python that MacPorts just built and installed with matplotlib.  To do this run the following two commands, note you may be asked to enter the administrators password before continuing:
<ol>
<li>&#8216;<span style="color: #008000;">sudo port install python_select</span>&#8216; and hit enter.</li>
<li>&#8216;<span style="color: #008000;">sudo python_select python26</span>&#8216; and hit enter.</li>
</ol>
</li>
<li>To test this all worked type the following: &#8216;python -V&#8217; and hit enter.  You should see output like &#8216;<span style="color: #808000;">Python 2.6.4</span>&#8216; which should match the version of python MacPorts built and installed.</li>
<li>Finally to test if matplotlib was installed correctly do the following:
<ol>
<li>Type &#8216;<span style="color: #008000;">python</span>&#8216; and hit enter to enter the python interactive shell.</li>
<li>Type &#8216;<span style="color: #008000;">import matplotlib</span>&#8216; and hit enter, this will import the matplotlib module.  There should be no output if this works.</li>
<li>Type &#8216;<span style="color: #008000;">print matplotlib.__version__</span>&#8216; and hit enter. This will print the version of matplotlib that is installed, you should see output like &#8216;<span style="color: #808000;">0.99.1.1</span>&#8216;.</li>
<li>Type &#8216;<span style="color: #008000;">exit()</span>&#8216; to quit the python interactive shell.</li>
</ol>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.endlesslycurious.com/2009/12/08/installing-matplotlib-on-snow-leopard-with-macports/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
