<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Computers are for People</title>
	
	<link>http://www.swegler.com/becky/blog</link>
	<description />
	<lastBuildDate>Thu, 02 Feb 2012 23:40:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/computersareforpeople" /><feedburner:info uri="computersareforpeople" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>No Excuses for Ugly Excel Charts</title>
		<link>http://feedproxy.google.com/~r/computersareforpeople/~3/pjGwq8Q8lu8/</link>
		<comments>http://www.swegler.com/becky/blog/2012/01/29/no-excuses-for-ugly-excel-charts/#comments</comments>
		<pubDate>Sun, 29 Jan 2012 22:48:29 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Visualization]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=816</guid>
		<description><![CDATA[2/2/2012: Corrected the revised bar chart by setting the horizontal axis minimum to zero. Thanks to Jon Peltier for catch. Excel remains the de-facto graphing tool at National Priorities Project. A simple chart is often the best way to convey information about federal spending and budgeting, and Excel is the common language among our researchers [...]]]></description>
			<content:encoded><![CDATA[<p><strong>2/2/2012: Corrected the revised bar chart by setting the horizontal axis minimum to zero. Thanks to <a title="Peltier Tech" href="http://peltiertech.com/WordPress/">Jon Peltier </a>for catch.</strong></p>
<p>Excel remains the de-facto graphing tool at National Priorities Project. A simple chart is often the best way to convey information about federal spending and budgeting, and Excel is the common language among our researchers and IT team.</p>
<p>Using Excel, however, is no excuse for ignoring style and the best practices of information display. So many organizations put out amazing, well-researched publications and then tack on default Excel graphs as an afterthought. But graphs are often what people look at first, and they deserve to be first-class citizens in the editing process.</p>
<p>I created some Excel chart templates for NPP, drawing on two sources for inspiration and practical advice: the classic <a title="The Visual Display of Quantitative Information" href="http://www.edwardtufte.com/tufte/books_vdqi">Visual Display of Quantitative Information</a> by Edward Tufte and <a title="The Wall Street Journal Guide to Information Graphics" href="http://www.amazon.com/Street-Journal-Guide-Information-Graphics/dp/0393072959">The Wall Street Journal Guide to Information Graphics</a> by Dona Wong.</p>
<p>Tufte is big on eliminating “unnecessary ink” that distracts from the information, and Wong advocates requiring the least amount of work on the reader’s part. With their advice in mind, I modified Excel’s default bar chart from this:</p>
<div id="attachment_820" class="wp-caption alignnone" style="width: 510px"><a href="http://www.swegler.com/becky/blog/wp-content/uploads/2012/01/horizontal-bar-default.png" rel="lightbox[816]" title="Excel bar chart - default"><img class="size-medium wp-image-820" title="Excel bar chart - default" src="http://www.swegler.com/becky/blog/wp-content/uploads/2012/01/horizontal-bar-default-500x318.png" alt="Excel bar chart - default" width="500" height="318" /></a><p class="wp-caption-text">Bar chart: Excel default</p></div>
<p>To this:</p>
<div id="attachment_866" class="wp-caption alignnone" style="width: 510px"><a href="http://www.swegler.com/becky/blog/wp-content/uploads/2012/02/horizontal-bar-modified.png" rel="lightbox[816]" title="Excel bar chart - modified"><img class="size-medium wp-image-866" title="Excel bar chart - modified" src="http://www.swegler.com/becky/blog/wp-content/uploads/2012/02/horizontal-bar-modified-500x317.png" alt="Excel bar chart - modified" width="500" height="317" /></a><p class="wp-caption-text">Bar chart: new template</p></div>
<ul>
<li>Smaller gap between bars</li>
<li>Don’t make readers guess the numbers; if possible, label the bars directly</li>
<li>Direct labeling means you don’t need the noisy gridlines or even the x-axis</li>
<li>Remove the y-axis tick marks for even more noise reduction</li>
<li>Get rid of those zeros by showing data in millions or billions</li>
<li>Make sure the entire length of the bars is shown (in this case, by setting the horizontal axis minimum to zero). HT Jon Peltier.</li>
</ul>
<p>The pie chart got a similar treatment. The Excel default:</p>
<div id="attachment_818" class="wp-caption alignnone" style="width: 510px"><a href="http://www.swegler.com/becky/blog/wp-content/uploads/2012/01/pie-default.png" rel="lightbox[816]" title="Excel pie chart - default"><img class="size-medium wp-image-818" title="Excel pie chart - default" src="http://www.swegler.com/becky/blog/wp-content/uploads/2012/01/pie-default-500x318.png" alt="Excel pie chart - default" width="500" height="318" /></a><p class="wp-caption-text">Pie chart: Excel default</p></div>
<p>The new template:</p>
<div id="attachment_819" class="wp-caption alignnone" style="width: 510px"><a href="http://www.swegler.com/becky/blog/wp-content/uploads/2012/01/pie-modified.png" rel="lightbox[816]" title="Excel pie chart - modified"><img class="size-medium wp-image-819" title="Excel pie chart - modified" src="http://www.swegler.com/becky/blog/wp-content/uploads/2012/01/pie-modified-500x317.png" alt="Excel pie chart - modified" width="500" height="317" /></a><p class="wp-caption-text">Pie chart: new template</p></div>
<ul>
<li>Label the pie slices directly—don’t make people use a legend to decode</li>
<li>Avoid the default Office color palette and develop your own (ours is based on colors from our website)</li>
<li>A white line between pie slices emphasizes the boundaries</li>
</ul>
<p>Excel isn&#8217;t perfect, but it&#8217;s out there in the world, and you can&#8217;t ignore it. Luckily, a little extra effort goes a long way.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2012/01/29/no-excuses-for-ugly-excel-charts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.swegler.com/becky/blog/2012/01/29/no-excuses-for-ugly-excel-charts/</feedburner:origLink></item>
		<item>
		<title>Be Accessible to the Dummy Demographic</title>
		<link>http://feedproxy.google.com/~r/computersareforpeople/~3/or7R1edkGpk/</link>
		<comments>http://www.swegler.com/becky/blog/2012/01/11/be-accessible-to-the-dummy-demographic/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 00:43:40 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Musings]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=784</guid>
		<description><![CDATA[I&#8217;ve always considered writing to be one of my professional strengths, and I&#8217;m passionate about making technology accessible to people. So when writing about government data for National Priorities Project, I try to make sure the language is easy to understand and non-wonky (wonk is the political equivalent of  nerd). After all, our mission statement [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always considered writing to be one of my professional strengths, and I&#8217;m passionate about making technology accessible to people. So when writing about government data for National Priorities Project, I try to make sure the language is easy to understand and non-wonky (<em>wonk</em> is the political equivalent of  <em>nerd</em>). After all, our mission statement says that NPP &#8220;makes complex budget information transparent and accessible.&#8221;</p>
<p>So when writing a brief paragraph to introduce a new dataset in the <a title="NPP's Federal Priorities Database" href="http://data.nationalpriorities.org">Federal Priorities Database</a>, I thought I nailed it:</p>
<blockquote><p>Federal tax collections represent the amount of federal taxes paid in a year.  The IRS publishes this information by state, breaking it into ten categories.  Because part of our job is to make government-published data more useful, we condensed these ten categories into three: taxes paid by businesses, taxes paid by individuals, and total taxes collected. We believe that these broad categories better reflect what most people want to know about tax revenue and are less confusing than the original data. In fact, the individual taxes calculation played an integral part in a recent publication, <em>Federal Spending Keeps Iowa, New Hampshire Afloat</em>.</p></blockquote>
<p>I have a few trusted readers in the office, so I sent the text around for some quick feedback. About five minutes later, one of them appeared at my desk, saying that my language was non-accessible and &#8220;made her eyes roll back in her head.&#8221; Wow. Hard to hear, but she followed up with some specific suggestions that resulted in a much improved, non-eye-rolling version:</p>
<blockquote><p>We recently took some data from the IRS and made it even better. We call it Federal Tax Collections, and it shows federal taxes collected in a year. Although the IRS helpfully provides these numbers for each state, they break the amounts into ten categories, not all of which are useful. For example, do any but the wonkiest people need to know how much railroad retirement tax was collected in 2010? To make things easier, we condensed these categories into taxes paid by businesses, taxes paid by individuals, and total taxes paid. We think these broader groupings are less confusing and more practical. Our recent publication, <em>Federal Spending Keeps Iowa, New Hampshire Afloat</em>, shows the individual taxes category in use.</p></blockquote>
<p>Thank goodness for honest feedback! It seems obvious, but the lessons here are easy to overlook when you&#8217;re cranking through a to-do list.</p>
<ul>
<li>No matter what kind of deadline you think you have, it&#8217;s always worth the time to get other eyes on something your organization will publish, even if it&#8217;s just a small blurb, and even if your colleagues are busy. After all, it&#8217;s in everyone&#8217;s best interest to show the world your best stuff.</li>
<li>Make sure your trusted readers include, as my friend calls herself, the <em>dummy demographic</em>, a term of affection for readers who aren&#8217;t experts in your subject matter.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2012/01/11/be-accessible-to-the-dummy-demographic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.swegler.com/becky/blog/2012/01/11/be-accessible-to-the-dummy-demographic/</feedburner:origLink></item>
		<item>
		<title>2012 Technical Goals</title>
		<link>http://feedproxy.google.com/~r/computersareforpeople/~3/Ph96D5UUrNs/</link>
		<comments>http://www.swegler.com/becky/blog/2012/01/04/2012-technical-goals/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 02:43:03 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Musings]]></category>
		<category><![CDATA[goal]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[nosql]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=776</guid>
		<description><![CDATA[It’s easy to get distracted by the constant barrage of new technology. Sometimes I miss my days of COBOL programming. Things changed a bit more slowly then, allowing programmers to truly master a language without worrying about missing the next big thing. Overall, however, being a technologist is a lot more exciting in 2012 than [...]]]></description>
			<content:encoded><![CDATA[<p>It’s easy to get distracted by the constant barrage of new technology. Sometimes I miss my days of COBOL programming. Things changed a bit more slowly then, allowing programmers to truly master a language without worrying about missing the next big thing.</p>
<p>Overall, however, being a technologist is a lot more exciting in 2012 than it was in the Y2K remediation days. That said, it’s time to stop worrying about every shiny new toy that comes along and focus on a few things that appeal to my interests and career aspirations.</p>
<p><strong>NoSQL</strong><br />
I know my way around an RDBMS, but 2012 will be the year I stop reading about NoSQL and start doing something with it. Flavor TBD.</p>
<p><strong><a title="d3.js" href="http://mbostock.github.com/d3/">D3.js</a></strong><br />
Data visualization is more than a fad. Not those disjointed, meaningless infographics floating around, but numbers rendered as pictures that tell a story. I’m not a graphic designer, but I am a programmer, so it makes sense to learn a tool that can programmatically create pictures of the federal data I work with every day.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2012/01/04/2012-technical-goals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.swegler.com/becky/blog/2012/01/04/2012-technical-goals/</feedburner:origLink></item>
		<item>
		<title>The Lazy Card</title>
		<link>http://feedproxy.google.com/~r/computersareforpeople/~3/Orz08uFLbWU/</link>
		<comments>http://www.swegler.com/becky/blog/2011/11/28/the-lazy-card/#comments</comments>
		<pubDate>Tue, 29 Nov 2011 03:19:14 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Musings]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=697</guid>
		<description><![CDATA[The administrator of a blog I follow recently asked the question, “should I force our blog’s authors to use Markdown?” I then read a completely unrelated post on another blog that advised WordPress users to get rid of the visual text editor because “it makes you lazy” and you should “force yourself to learn some [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.swegler.com/becky/blog/wp-content/uploads/2011/11/2555362706_c7d431a12b_b.jpg" rel="lightbox[697]" title="lazy"><img class="alignnone size-medium wp-image-701" title="lazy" src="http://www.swegler.com/becky/blog/wp-content/uploads/2011/11/2555362706_c7d431a12b_b-500x375.jpg" alt="lazy" width="500" height="375" /></a></p>
<p>The administrator of a blog I follow recently asked the question, “should I force our blog’s authors to use Markdown?”</p>
<p>I then read a completely unrelated post on another blog that advised WordPress users to get rid of the visual text editor because “it makes you lazy” and you should “force yourself to learn some basic HTML.”</p>
<p>When I got into a heated discussion with another developer about the above two items, he used the same word to describe non-Markdown/HTML-writing, WYSIWYG-dependent online content authors: <em>lazy</em>.</p>
<p>This isn’t the first argument I’ve had with a technologist who likes to play the lazy card, and it won’t be the last. I’m not disputing that everyone in today’s workforce should always be learning; the days of doing the same job the same way for thirty years are over. But to imply that a blogging co-worker isn’t holding up her end of the learning bargain because she doesn’t want to learn HTML or Markdown is arrogant.</p>
<p>As technologists, we explore and experiment with new technology. Our content-creating colleagues presumably explore and experiment in their respective areas of expertise. Who are we to dictate that they should increase their cognitive overhead by worrying about valid XHTML markup?</p>
<p>Yes, WYSIWYG editors are pretty terrible. They puke out Microsoft Word detritus and let you change the font color to cyan. Forcing people to write in Markdown, however, shifts a technical problem from the technologist to the user, which is the opposite of ideal.</p>
<p>This rant isn’t about blog authors or Markdown. It’s about acknowledging that technology isn’t everyone’s primary concern, nor should it be.</p>
<p>Of course there are appropriate times to force technology changes. But even in those situations the resistors aren’t lazy&#8211;they just have a different job than you. In today’s hectic and stressed workplace, shouldn’t we give colleagues the benefit of the doubt and help them succeed with technology rather than slapping a label on them?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2011/11/28/the-lazy-card/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.swegler.com/becky/blog/2011/11/28/the-lazy-card/</feedburner:origLink></item>
		<item>
		<title>Python, Django, MySQL &amp; Win 7</title>
		<link>http://feedproxy.google.com/~r/computersareforpeople/~3/17_lU7oGNrE/</link>
		<comments>http://www.swegler.com/becky/blog/2011/09/14/python-django-and-mysql-on-windows-7/#comments</comments>
		<pubDate>Thu, 15 Sep 2011 02:49:47 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Musings]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=675</guid>
		<description><![CDATA[When starting to learn Python and Django, my goal was to set up a robust development environment similar to what we use at National Priorities Project: isolated virtual environments, MySQL, and tools like pip and iPython. Stubbornly, I resolved to make it all work on Windows. I achieved the goal, but not without a lot [...]]]></description>
			<content:encoded><![CDATA[<p>When starting to learn Python and Django, my goal was to set up a robust development environment similar to what we use at National Priorities Project: isolated virtual environments, MySQL, and tools like pip and iPython. Stubbornly, I resolved to make it all work on Windows.</p>
<p>I achieved the goal, but not without a lot pain. If you&#8217;re a Windows user getting started with Python/Django, you might have an easier time installing a virtual Linux machine.</p>
<p>Here&#8217;s a re-cap of the Windows-specific instructions for installing Python, Django, MySQL, and a few necessary packages and tools.</p>
<ul>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 1: Getting Started" href="http://www.swegler.com/becky/blog/2011/08/27/python-django-mysql-on-windows-7-part-i-getting-started/">Part 1: installing Python, Pip, and iPython</a></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 2: Virtual Environments" href="http://www.swegler.com/becky/blog/2011/08/28/python-django-mysql-on-windows-7-part-2-virtual-environments/">Part 2: virtual environments</a></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 3: iPython &amp; Virtual Environments" href="http://www.swegler.com/becky/blog/2011/08/28/python-django-mysql-on-windows-7-part-3-ipython-virtual-environments/">Part 3: making iPython recognize virtual environments</a></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 4: Installing Django" href="http://www.swegler.com/becky/blog/2011/09/14/python-django-mysql-on-windows-7-part-4-installing-django/">Part 4: installing Django</a></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 5: Installing MySQL" href="http://www.swegler.com/becky/blog/2011/09/14/python-django-mysql-on-windows-7-part-5-installing-mysql/">Part 5: installing MySQL</a></li>
</ul>
<div>Parting thoughts:</div>
<div>
<ul>
<li>I abandoned the Cygwin approach after running into trouble with Cygwin&#8217;s Python install vs the Windows Python install.</li>
<li>People have good things to say about <a title="ActivePython" href="http://www.activestate.com/activepython/downloads">ActivePython</a> as a tool to help Python developers to avoid headaches.</li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2011/09/14/python-django-and-mysql-on-windows-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.swegler.com/becky/blog/2011/09/14/python-django-and-mysql-on-windows-7/</feedburner:origLink></item>
		<item>
		<title>Python, Django, &amp; MySQL on Windows 7, Part 5: Installing MySQL</title>
		<link>http://feedproxy.google.com/~r/computersareforpeople/~3/mKAqBFfeQZg/</link>
		<comments>http://www.swegler.com/becky/blog/2011/09/14/python-django-mysql-on-windows-7-part-5-installing-mysql/#comments</comments>
		<pubDate>Thu, 15 Sep 2011 02:04:51 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=629</guid>
		<description><![CDATA[This is the fifth and final post in a  dummies guide to getting stared with Python, Django, &#38; MySQL on Windows 7. Part 1: getting started Part 2: virtual environments Part 3: making iPython recognize virtual environments Part 4: installing Django Part 5: installing MySQL (you are here) By now, you should have Django installed [...]]]></description>
			<content:encoded><![CDATA[<p>This is the fifth and final post in a  dummies guide to getting stared with Python, Django, &amp; MySQL on Windows 7.</p>
<ul>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 1: Getting Started" href="http://www.swegler.com/becky/blog/2011/08/27/python-django-mysql-on-windows-7-part-i-getting-started/">Part 1: getting started</a></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 2: Virtual Environments" href="http://www.swegler.com/becky/blog/2011/08/28/python-django-mysql-on-windows-7-part-2-virtual-environments/">Part 2: virtual environments</a></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 3: iPython &amp; Virtual Environments" href="http://www.swegler.com/becky/blog/2011/08/28/python-django-mysql-on-windows-7-part-3-ipython-virtual-environments/">Part 3: making iPython recognize virtual environments</a></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 4: Installing Django" href="http://www.swegler.com/becky/blog/2011/09/14/python-django-mysql-on-windows-7-part-4-installing-django/">Part 4: installing Django</a></li>
<li><strong>Part 5: installing MySQL (you are here)</strong></li>
</ul>
<p>By now, you should have Django installed into a virtual environment.  These tutorials aren&#8217;t meant to cover building a django app, just to point out the quirks involved with getting a project up and running on Windows.  These tutorials also assume you want to construct real applications using a real development environment.</p>
<p>To that end, you&#8217;ll want a heftier database than sqlite.  We use MySQL at the office, so these instructions cover installing it and using it with Django.</p>
<h3>Install MySQL</h3>
<ol>
<li><a title="MySQL downloads" href="http://www.mysql.com/downloads/mysql/">Download</a> and install MySQL.</li>
<li>Once MySQL is installed, proceed through the configuration wizard. Check <em>Include Bin Directory in Windows PATH </em>box.</li>
<li>When prompted, set a password for the MySQL <em>root</em> account.</li>
<li>Once the installation wizard is done, open a command window and log in to MySQL with the root account: <code>mysql -uroot -p</code> (you&#8217;ll be prompted for the password).</li>
<li>After logging in, run the following commands to create a database, create a user for your Django project, and grant the user database access.
</li>
<script src="https://gist.github.com/1202410.js"></script><noscript><p>View the code on <a href="https://gist.github.com/1202410">Gist</a>.</p></noscript>
</ol>
<h3>Install MySQL-python</h3>
<p>You&#8217;ll need the MySQL-python package, a Python interface to MySQL.</p>
<ol>
<li>Download the windows MySQL-python distribution <a title="MySQL-python for Windows Distributions" href="http://www.codegood.com/downloads?dl_cat=2">here</a>.  The author has some <a title="MySQL-python 1.2.3 for Windows and Python 2.7, 32bit and 64bit versions" href="http://www.codegood.com/archives/category/python">instructions</a> about the appropriate version; assuming a 32-bit version of Python 2.7, you&#8217;d download <a title="MySQL-python-1.2.3.win32-py2.7.exe" href="http://www.codegood.com/download/10/">this package</a> (.exe).</li>
<li>After downloading, do not run the Windows installer. Doing so will install MySQL-python to your root python, which virtual environments created via <em>&#8211;no-site-packages </em>won&#8217;t be able to see.</li>
<li>Instead, install the downloaded package to your virtual environment by using easy_install, which can <a title="StackOverflow: Can I install Python windows packages into virtualenvs?" href="http://stackoverflow.com/questions/3271590/can-i-install-python-windows-packages-into-virtualenvs/5442340#5442340">install from Windows binary installers</a>:<br />
<code>easy_install file://c:/users/you/downloads/mysql-python-1.2.3.win32-py2.7.exe </code>(modify to reflect the location of the downloaded installer and its name).<a href="http://www.swegler.com/becky/blog/wp-content/uploads/2011/09/climsy_20110901_195047.jpg" rel="lightbox[629]" title="installing mysql-python package via easy_install"><img class="alignnone size-medium wp-image-635" title="installing mysql-python package via easy_install" src="http://www.swegler.com/becky/blog/wp-content/uploads/2011/09/climsy_20110901_195047-500x304.jpg" alt="installing mysql-python package via easy_install" width="500" height="304" /></a></li>
</ol>
<h3>Configure Django</h3>
<p>Next, you&#8217;ll need to update the database-related settings of your Django project.</p>
<ol>
<li>From the directory of your Django project, open <em>settings.py</em> using your favorite editor.</li>
<li>Update the <em>default</em> key in the<em> DATABASES</em> dictionary.  Set <em>ENGINE</em> to <em>django.db.backends.mysql</em> and set <em>NAME</em>, <em>USER, </em>and <em>PASSWORD</em> to the database name, username, and password you chose when installing MySQL.  See <a title="Writing your first Django app, part 1" href="https://docs.djangoproject.com/en/1.3/intro/tutorial01/">Part I</a> of the Django tutorial for more information about database settings.</li>
<li>Open a command window, activate your virtual environment, and change to the directory of your Django project.</li>
<li>Type <code>python manage.py syncdb</code>. This command creates the underlying tables required for your Django project.<br />
<a href="http://www.swegler.com/becky/blog/wp-content/uploads/2011/09/climsy_20110914_214634.jpg" rel="lightbox[629]" title="syncdb output"><img class="alignnone size-medium wp-image-653" title="syncdb output" src="http://www.swegler.com/becky/blog/wp-content/uploads/2011/09/climsy_20110914_214634-500x304.jpg" alt="syncdb output" width="500" height="304" /></a></li>
<li>If the syncdb worked, you have Python, Django, and MySQL communicating in harmony.  Congratulations!  You can now proceed through the <a title="Django tutorial" href="https://docs.djangoproject.com/en/1.3/intro/tutorial01/">Django tutorial</a> and create your first application.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2011/09/14/python-django-mysql-on-windows-7-part-5-installing-mysql/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.swegler.com/becky/blog/2011/09/14/python-django-mysql-on-windows-7-part-5-installing-mysql/</feedburner:origLink></item>
		<item>
		<title>Python, Django, &amp; MySQL on Windows 7, Part 4: Installing Django</title>
		<link>http://feedproxy.google.com/~r/computersareforpeople/~3/PJWQqnmG5LA/</link>
		<comments>http://www.swegler.com/becky/blog/2011/09/14/python-django-mysql-on-windows-7-part-4-installing-django/#comments</comments>
		<pubDate>Thu, 15 Sep 2011 02:00:18 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[virtualenv]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=567</guid>
		<description><![CDATA[This is the fourth post in a  dummies guide to getting stared with Python, Django, &#38; MySQL on Windows 7. Part 1: getting started Part 2: virtual environments Part 3: making iPython recognize virtual environments Part 4: installing Django (you are here) Part 5: installing MySQL We&#8217;re finally ready to install Django, a popular Web-development [...]]]></description>
			<content:encoded><![CDATA[<p>This is the fourth post in a  dummies guide to getting stared with Python, Django, &amp; MySQL on Windows 7.</p>
<ul>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 1: Getting Started" href="http://www.swegler.com/becky/blog/2011/08/27/python-django-mysql-on-windows-7-part-i-getting-started/">Part 1: getting started</a></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 2: Virtual Environments" href="http://www.swegler.com/becky/blog/2011/08/28/python-django-mysql-on-windows-7-part-2-virtual-environments/">Part 2: virtual environments</a></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 3: iPython &amp; Virtual Environments" href="http://www.swegler.com/becky/blog/2011/08/28/python-django-mysql-on-windows-7-part-3-ipython-virtual-environments/">Part 3: making iPython recognize virtual environments</a></li>
<li><strong>Part 4: installing Django (you are here)</strong></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 5: Installing MySQL" href="http://www.swegler.com/becky/blog/2011/09/14/python-django-mysql-on-windows-7-part-5-installing-mysql/">Part 5: installing MySQL</a></li>
</ul>
<div>We&#8217;re finally ready to install Django, a popular Web-development framework. Detailed instructions for building out a Django site are beyond the scope of this humble tutorial; try <em><a href="http://www.amazon.com/Definitive-Guide-Django-Development-Experts/dp/143021936X/">The Definitive Guide to Django</a> </em>or Django&#8217;s online <em><a title="Django: getting started" href="https://docs.djangoproject.com/en/1.3/intro/">Getting started</a></em> docs for that.</div>
<p>These directions will simply make sure you can get up and running.</p>
<h3>Installing Django</h3>
<ol>
<li>Open a command window.</li>
<li>Go to (or create) the virtual environment you&#8217;ll be using for your django project. For this example, I created a virtualenv called django-tutorial: <code>virtualenv django-tutorial --no-site-packages<br />
</code></li>
<li>Install django: <code>pip install django<br />
<a href="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110828_185611.jpg"><img class="alignnone size-medium wp-image-568" title="install django" src="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110828_185611-500x354.jpg" alt="install django" width="500" height="354" /></a> </code></li>
<li>Start an interactive interpreter by typing <code>python</code> (or <code>iPython</code>, if you&#8217;ve made it <a title="Python, Django, &amp; MySQL on Windows 7, Part 3: iPython &amp; Virtual Environments" href="http://www.swegler.com/becky/blog/2011/08/28/python-django-mysql-on-windows-7-part-3-ipython-virtual-environments/">virtual environment-aware</a>).</li>
<li>Test the install by importing the django module and checking its version: https://gist.github.com/1177372</li>
<li>Create a new directory to hold your Django projects and code. Change to it.</li>
<li>Think of a name for your first Django project and create it by running the following command: <code>python -m django-admin startproject [projectname]</code>.<br />
<strong>Important:</strong> most Django docs show <code>django-admin.py startproject [projectname]</code> to start a new project, which can cause import errors and other trouble for Windows users. See this <a title="No matter what I do, django-admin.py is not found, even though it's in my path" href="http://stackoverflow.com/questions/2542674/no-matter-what-i-do-django-admin-py-is-not-found-even-though-its-in-my-path">stackoverflow thread</a> for details.</li>
<li>You should now see the project&#8217;s folder in your Django directory:<a href="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110828_200723.jpg" rel="lightbox[567]" title="django project folder"><img class="alignnone size-medium wp-image-576" title="django project folder" src="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110828_200723-500x71.jpg" alt="django project folder" width="500" height="71" /></a></li>
<li>Change into the new project folder.</li>
<li>Test the new project by typing <code>python manage.py</code>.  Manage.py is Django&#8217;s command line utility; you should see a list of its available subcommands.</li>
<li>A further test is to start up Django&#8217;s development server: <code>python manage.py runserver</code>. You should see something like this:<br />
<a href="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110828_201850.jpg" rel="lightbox[567]" title="django runserver"><img class="alignnone size-medium wp-image-578" title="django runserver" src="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110828_201850-500x204.jpg" alt="django runserver" width="500" height="204" /></a></li>
</ol>
<p>If you&#8217;ve made it this far, you&#8217;ve successfully installed Django and created your first project.</p>
<p>Next up is <a title="Python, Django, &amp; MySQL on Windows 7, Part 5: Installing MySQL" href="http://www.swegler.com/becky/blog/2011/09/14/python-django-mysql-on-windows-7-part-5-installing-mysql/">Part 5: Installing MySQL</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2011/09/14/python-django-mysql-on-windows-7-part-4-installing-django/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.swegler.com/becky/blog/2011/09/14/python-django-mysql-on-windows-7-part-4-installing-django/</feedburner:origLink></item>
		<item>
		<title>Python, Django, &amp; MySQL on Windows 7, Part 3: iPython &amp; Virtual Environments</title>
		<link>http://feedproxy.google.com/~r/computersareforpeople/~3/C-fjPYBFD38/</link>
		<comments>http://www.swegler.com/becky/blog/2011/08/28/python-django-mysql-on-windows-7-part-3-ipython-virtual-environments/#comments</comments>
		<pubDate>Sun, 28 Aug 2011 22:40:31 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ipython]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[virtualenv]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=538</guid>
		<description><![CDATA[This is the third post in a dummies guide to getting started with Python, Django, &#38; MySQL on Windows 7. Part 1: installing Python, pip, and iPython Part 2: virtual environments Part 3: making iPython work in virtual environments (you are here) Part 4: installing Django Part 5: installing MySQL The last installment covered setting up [...]]]></description>
			<content:encoded><![CDATA[<p>This is the third post in a dummies guide to getting started with Python, Django, &amp; MySQL on Windows 7.</p>
<ul>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part I: Getting Started" href="http://www.swegler.com/becky/blog/2011/08/27/python-django-mysql-on-windows-7-part-i-getting-started/">Part 1: installing Python, pip, and iPython</a></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 2: Virtual Environments" href="http://www.swegler.com/becky/blog/2011/08/28/python-django-mysql-on-windows-7-part-2-virtual-environments/">Part 2: virtual environments</a></li>
<li><strong>Part 3: making iPython work in virtual environments (you are here)</strong></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 4: Installing Django" href="http://www.swegler.com/becky/blog/2011/09/14/python-django-mysql-on-windows-7-part-4-installing-django/">Part 4: installing Django</a></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 5: Installing MySQL" href="http://www.swegler.com/becky/blog/2011/09/14/python-django-mysql-on-windows-7-part-5-installing-mysql/">Part 5: installing MySQL</a></li>
</ul>
<p>The <a title="Python, Django, &amp; MySQL on Windows 7, Part 2: Virtual Environments" href="http://www.swegler.com/becky/blog/2011/08/28/python-django-mysql-on-windows-7-part-2-virtual-environments/">last installment</a> covered setting up virtual environments.</p>
<h2>Part 3: iPython and Virtual Environments</h2>
<h3>iPython is not virtual environment-aware</h3>
<p>iPython is a valuable tool, but you&#8217;ll have to tweak it to work with virtual environments. By default, iPython isn&#8217;t aware of a virtual environment&#8217;s packages.</p>
<p>For example, if you install a package into a virtualenv and try to use it via Python&#8217;s built-in shell, everything works:</p>
<p><a href="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110828_182911.jpg" rel="lightbox[538]" title="import via python"><img class="alignnone size-medium wp-image-558" title="import via python" src="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110828_182911-500x178.jpg" alt="import via python" width="500" height="178" /></a></p>
<p>Try the same thing with iPython, however, and you get an import error:</p>
<p><a href="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110828_182715.jpg" rel="lightbox[538]" title="import via ipython"><img class="alignnone size-medium wp-image-557" title="import via ipython" src="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110828_182715-500x216.jpg" alt="import via ipython" width="500" height="216" /></a></p>
<p>A little intervention is required to make iPython virtual environment-aware. If you&#8217;re okay with using Python&#8217;s built-in interactive shell instead of iPython, skip ahead to <a title="Python, Django, &amp; MySQL on Windows 7, Part 4: Installing Django" href="http://www.swegler.com/becky/blog/2011/09/14/python-django-mysql-on-windows-7-part-4-installing-django/">Part 4: Installing Django</a>.</p>
<h3>Install iPython to the virtual environment</h3>
<p>The easiest and most obvious solution to make iPython work with a virtual environment is to install it to the virtual environment.</p>
<p>However, you will have to do this for each environment you work in.  Furthermore, if you created the virtual environment without the &#8211;no-site-packages option (which tells virtualenv not to inherit anything from global site-packages), you may get an &#8220;already installed&#8221; message.</p>
<h3>Modify iPython config file</h3>
<p>Another way to ensure iPython behaves with virtual environments is to use its configuration file to check for an active virtual environment and modify the import path accordingly. The directions below assume iPython is installed globally but not in any of your virtual environments.</p>
<ol>
<ol>
<li>Open a command window.</li>
<li>Instruct iPython to generate a sample configuration file (called <em>ipython_config.py</em>) by typing <code>ipython profile create</code></li>
<li>The sample file should now be in your iPython profile folder. On Windows, this is <em>[your user folder]\.ipython\profile_default.</em></li>
<li>Open ipython_config.py in a text editor and add the following code to the bottom. I relied heavily on code from <a title="iPython and virtualenv" href="http://blog.ufsoft.org/2009/1/29/ipython-and-virtualenv">here</a> and <a title="Virtual Environments" href="http://code.google.com/p/modwsgi/wiki/VirtualEnvironments">here</a>, making a few tweaks.
<p>https://gist.github.com/1176035</li>
<li>Activate a virtual environment.</li>
<li>Start up iPython and look for the output confirming the current active virtual environment:<a href="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110828_181718.jpg" rel="lightbox[538]" title="ipython &amp; virtualenv"><img class="alignnone size-medium wp-image-556" title="ipython &amp; virtualenv" src="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110828_181718-500x329.jpg" alt="ipython &amp; virtualenv" width="500" height="329" /></a></li>
</ol>
</ol>
<div>The next installment is <a title="Python, Django, &amp; MySQL on Windows 7, Part 4: Installing Django" href="http://www.swegler.com/becky/blog/2011/09/14/python-django-mysql-on-windows-7-part-4-installing-django/">Part 4: Installing Django</a>.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2011/08/28/python-django-mysql-on-windows-7-part-3-ipython-virtual-environments/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.swegler.com/becky/blog/2011/08/28/python-django-mysql-on-windows-7-part-3-ipython-virtual-environments/</feedburner:origLink></item>
		<item>
		<title>Python, Django, &amp; MySQL on Windows 7, Part 2: Virtual Environments</title>
		<link>http://feedproxy.google.com/~r/computersareforpeople/~3/1cYn0BPEJCk/</link>
		<comments>http://www.swegler.com/becky/blog/2011/08/28/python-django-mysql-on-windows-7-part-2-virtual-environments/#comments</comments>
		<pubDate>Sun, 28 Aug 2011 15:51:47 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[virtualenv]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=509</guid>
		<description><![CDATA[This is the second post in a dummies guide to getting stared with Python, Django, &#38; MySQL on Windows 7. Part 1: installing Python, pip, and iPython Part 2: virtual environments (you are here) Part 3: making iPython work in virtual environments Part 4: installing Django Part 5: installing MySQL Part 1 of the Python, [...]]]></description>
			<content:encoded><![CDATA[<p>This is the second post in a dummies guide to getting stared with Python, Django, &amp; MySQL on Windows 7.</p>
<ul>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part I: Getting Started" href="http://www.swegler.com/becky/blog/2011/08/27/python-django-mysql-on-windows-7-part-i-getting-started/">Part 1: installing Python, pip, and iPython</a></li>
<li><strong>Part 2: virtual environments (you are here)</strong></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 3: iPython &amp; Virtual Environments" href="http://www.swegler.com/becky/blog/2011/08/28/python-django-mysql-on-windows-7-part-3-ipython-virtual-environments/">Part 3: making iPython work in virtual environments</a></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 4: Installing Django" href="http://www.swegler.com/becky/blog/2011/09/14/python-django-mysql-on-windows-7-part-4-installing-django/">Part 4: installing Django</a></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 5: Installing MySQL" href="http://www.swegler.com/becky/blog/2011/09/14/python-django-mysql-on-windows-7-part-5-installing-mysql/">Part 5: installing MySQL</a></li>
</ul>
<p><a title="Python, Django, &amp; MySQL on Windows 7, Part I: Getting Started" href="http://www.swegler.com/becky/blog/2011/08/27/python-django-mysql-on-windows-7-part-i-getting-started/">Part 1</a> of the Python, Django, and MySQL on Windows 7 tutorial covered the basics:  installing Python and some package management tools.</p>
<h2>Set up virtual environments</span></h2>
<p>We saw how easy it is to install Python packages such as iPython.  Just run the install command, and everything you need goes into Python&#8217;s site-packages folder.  But what if different projects require different packages or even different versions of the same package?  Of what if you have a project that requires an older version of Python?</p>
<p>If you&#8217;re planning to work on multiple applications, you need <a title="python virtual environments" href="http://pypi.python.org/pypi/virtualenv">virtual environments</a> to prevent a big mess of dependencies gone awry. Each virtual environment has its own installation directories, separate from other environments.</p>
<p>Virtual environments are brought to you courtesy of the <a title="virtualenv package" href="http://pypi.python.org/pypi/virtualenv">virtualenv package</a>.  To install the package and create a virtual environment:</p>
<ol>
<li>Open a command window.</li>
<li>Install virtualenv by typing <code>pip install virtualenv</code> and waiting for the <em>successfully installed virtualenv</em> message.</li>
<li>Create a folder to hold your virtual environments (for example, c:\virtualenvs) and cd it (it&#8217;s easier if there are no spaces in the folder name).</li>
<li>Create a new virtual environment by typing <code>virtualenv --no-site-packages [environment name]</code>.  The output will look something like this:<br />
<a href="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110810_183905.jpg" rel="lightbox[509]" title="virtualenv output"><img class="alignnone size-medium wp-image-515" title="virtualenv output" src="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110810_183905-500x274.jpg" alt="virtualenv output" width="500" height="274" /></a></li>
<li>Look at your virtual environments folder. You should now see a sub-folder with the name of your new environment.</li>
<li>Create another environment, just for fun: <code>virtualenv env2 --no-site-packages</code></li>
<li>Activate a virtual environment by running its activate script, located in the environment&#8217;s Scripts folder. In this example, the command is <code>c:\virtualenvs\env1\scripts\activate</code>.</li>
<li>The command prompt is now preceded by the environment name&#8211;that&#8217;s how you know the environment is active. The activate script also takes care of adding the virtual environment&#8217;s scripts folder to the beginning of your path.</li>
<li>Now that a virtual environment is active, try installing  a package (we&#8217;ll use <a title="python-twitter" href="http://pypi.python.org/pypi/python-twitter/0.8.2">python-twitter</a> as an example): <code>pip install python-twitter</code></li>
<li>Once the package is installed, you can see that it&#8217;s in the site-packages folder of the virtual environment, but the original Python install and the other virtual environments remain untouched.<br />
<a href="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110827_194029.jpg" rel="lightbox[509]" title="module installed into virtual environment"><img class="alignnone size-medium wp-image-532" title="module installed into virtual environment" src="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110827_194029-500x357.jpg" alt="module installed into virtual environment" width="500" height="357" /></a></li>
<li>To deactivate the environment, just run the deactivate script in [envrionment name]\scripts\deactivate</li>
</ol>
<p><strong>Bonus:</strong> Virtualenvwrapper is a handy set of extensions for virtual environments. This is a necessary tool if you deal with multiple environments on a daily basis, but it&#8217;s not essential right now if you&#8217;ll be working in a single environment. The Windows virtualenvwrapper port is <a title="windows virtualenvwrapper" href="https://github.com/davidmarble/virtualenvwrapper-win">here</a>.</p>
<p><a title="Python, Django, &amp; MySQL on Windows 7, Part 3: iPython &amp; Virtual Environments" href="http://www.swegler.com/becky/blog/2011/08/28/python-django-mysql-on-windows-7-part-3-ipython-virtual-environments/">Coming next&#8230;</a> getting iPython to work with virtual environments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2011/08/28/python-django-mysql-on-windows-7-part-2-virtual-environments/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.swegler.com/becky/blog/2011/08/28/python-django-mysql-on-windows-7-part-2-virtual-environments/</feedburner:origLink></item>
		<item>
		<title>Python, Django, &amp; MySQL on Windows 7, Part 1: Installing Python, Pip, and iPython</title>
		<link>http://feedproxy.google.com/~r/computersareforpeople/~3/PO8N6P4sUGA/</link>
		<comments>http://www.swegler.com/becky/blog/2011/08/27/python-django-mysql-on-windows-7-part-i-getting-started/#comments</comments>
		<pubDate>Sat, 27 Aug 2011 23:46:06 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ipython]]></category>
		<category><![CDATA[pip]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=464</guid>
		<description><![CDATA[When starting my current job, I was new to Linux, Python, Django, MySQL, and pretty much every other technology the organization uses.  Furthermore, as the office&#8217;s only Windows 7 person, I was on my own when setting up a development environment. I found several helpful tutorials but ended up creating more detailed instructions to reflect my [...]]]></description>
			<content:encoded><![CDATA[<p>When starting my current job, I was new to Linux, Python, Django, MySQL, and pretty much every other technology the organization uses.  Furthermore, as the office&#8217;s only Windows 7 person, I was on my own when setting up a development environment.</p>
<p>I found several <a title="StuartEllis.eu: starting Python development on Windows" href="http://www.stuartellis.eu/articles/python-development-windows/">helpful</a> <a title="Adlibitum: How to install and setup a Python Django development environment on Windows 7" href="http://blog.adlibre.org/2011/01/11/how-to-install-and-setup-a-python-django-development-environment-on-windows-7/">tutorials</a> but ended up creating more detailed instructions to reflect my level of experience and our project structure. These notes became my dummies guide to setting up Python, Django, and MySQL on Windows 7.</p>
<ul>
<li><strong>Part 1: installing Python, pip, and iPython (you are here)</strong></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 2: Virtual Environments" href="http://www.swegler.com/becky/blog/2011/08/28/python-django-mysql-on-windows-7-part-2-virtual-environments/">Part 2: virtual environments</a></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 3: iPython &amp; Virtual Environments" href="http://www.swegler.com/becky/blog/2011/08/28/python-django-mysql-on-windows-7-part-3-ipython-virtual-environments/">Part 3: making iPython work in virtual environments</a></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 4: Installing Django" href="http://www.swegler.com/becky/blog/2011/09/14/python-django-mysql-on-windows-7-part-4-installing-django/">Part 4: installing Django</a></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 5: Installing MySQL" href="http://www.swegler.com/becky/blog/2011/09/14/python-django-mysql-on-windows-7-part-5-installing-mysql/">Part 5: installing MySQL</a></li>
</ul>
<h2><span class="Apple-style-span" style="font-size: 15px;">Install Python</span></h2>
<ol>
<li><a title="Python Windows downloads" href="http://www.python.org/download/">Install Python</a> (I used the <a title="Python 2.7.2 Windows Installer" href="http://www.python.org/ftp/python/2.7.2/python-2.7.2.msi">Python 2.7.2 Windows Installer</a>).</li>
<li>Modify your path environment variable to include the location of the installed Python executable.  To change environment variables in Windows 7:</li>
<ul>
<li>Click the Windows start button in the lower-left corner of the screen.</li>
<li>In the <em>Search programs and files</em> box, type <em>environment variables</em></li>
<li>When the search results appear, click <em><em>Edit the system environment variables</em></em><a href="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110802_231120.jpg" rel="lightbox[464]" title="edit environment variables"><img class="alignnone size-medium wp-image-473" style="border-style: initial; border-color: initial; border-width: 0px;" title="edit environment variables" src="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110802_231120-370x500.jpg" alt="edit environment variables" width="370" height="500" /></a></li>
<li>You should now see the <em>System Properties </em>window.  Click <em><em>Environment Variables&#8230;</em></em><a href="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110802_231328.jpg" rel="lightbox[464]" title="environment variables"><img class="alignnone size-full wp-image-474" style="border-style: initial; border-color: initial; border-width: 0px;" title="environment variables" src="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110802_231328.jpg" alt="environment variables" width="426" height="474" /></a></li>
<li>When the <em>Environment Variables </em>window opens, choose <em>Path</em> from the <em>System variables</em> list and click <em>Edit&#8230;</em></li>
<li>Append the following location of the Python executable and the Python Scripts folder to the variable value, making sure everything is separated by a semicolon. For example, <code>;C:\Python27;C:\Python27\Scripts</code></li>
<li>Click <em>OK </em>after modifying the variable value, and click <em>OK</em> again to exit the <em>Environment Variables</em> dialog.</li>
</ul>
<li>You should now be able to bring up an interactive Python shell by opening a command window and typing <code>python</code>.<br />
<a href="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110809_202217.jpg" rel="lightbox[464]" title="welcome to python"><img class="alignnone size-medium wp-image-499" title="welcome to python" src="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110809_202217-500x252.jpg" alt="welcome to python" width="500" height="252" /></a></li>
</ol>
<h3>Get a package installation and management tool</h3>
<p>Many kind people have written functionality-enhancing <a title="index of Python Packages" href="http://pypi.python.org/pypi/">Python Packages</a>, and sooner rather than later you&#8217;ll need to use some of them. Life will be much easier if you have a tool to install and manage these packages.</p>
<p>Two such tools are <a title="pip" href="http://pypi.python.org/pypi/pip">pip</a> and easy_install (part of <a title="setuptools" href="http://pypi.python.org/pypi/setuptools">setuptools</a>).  Despite some disadvantages on Windows, I chose pip after reading this <a title="SO: why use pip over easy_install" href="http://stackoverflow.com/questions/3220404/why-use-pip-over-easy-install">StackOverflow thread</a>.</p>
<p>Unfortunately, pip doesn&#8217;t have a Windows installer. The easiest workaround is to install setuptools (which <strong>does</strong> have a Windows installer) and then use it to install pip.  Directions below are a modified version of yet another <a title="SO: how to install pip on Windows" href="http://stackoverflow.com/questions/4750806/how-to-install-pip-on-windows">StackOverflow thread</a>.</p>
<ol>
<li>Download the <a title="setuptools Windows installers" href="http://pypi.python.org/pypi/setuptools#files">setuptools MS Windows installer</a> that corresponds to your installed version of Python.</li>
<li>Run the setuptools install wizard.  It should automatically find your Python installation directory.<a href="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110802_225101.jpg" rel="lightbox[464]" title="setuptools install"><img class="alignnone size-medium wp-image-472" style="border-style: initial; border-color: initial; border-width: 0px;" title="setuptools install" src="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110802_225101-500x324.jpg" alt="setuptools install" width="500" height="324" /></a></li>
<li>Make sure you have a way to extract .tar files (<em>e.g.</em>, <a title="7-Zip" href="http://www.7-zip.org/">7-Zip</a>).</li>
<li><a title="pip download" href="http://pypi.python.org/pypi/pip#downloads">Download pip</a>.</li>
<li>Uncompress the pip download</li>
<li>Open a Windows command prompt and <code>cd</code> to the directory that contains the uncompressed pip download (the folder structure looks something like <em>pip/pip-1.0.x</em>).</li>
<li>From that directory, type <code>python setup.py install</code></li>
<li>After this script runs, you should see a confirmation message that pip was installed to the <em>site-packages</em> folder of your python install (this folder will house all of the Python packages you install).<a href="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110802_232723.jpg" rel="lightbox[464]" title="pip install"><img class="alignnone size-medium wp-image-475" style="border-style: initial; border-color: initial; border-width: 0px;" title="pip install" src="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110802_232723-500x252.jpg" alt="" width="500" height="252" /></a></li>
<li>If you get an error message, it&#8217;s probably because you haven&#8217;t added your Python directory to your path (see <a title="install python" href="#install">I</a> above).</li>
</ol>
<h3>Install iPython</h3>
<p>You don&#8217;t know it yet, but you <em>need</em> <a title="iPython" href="http://ipython.org/">iPython</a>.  It&#8217;s a richer version Python&#8217;s out-of-the-box interactive shell and has some extremely helpful features for people learning the language (object introspection, macros, code completion). iPython is easy to install now that you have a package management tool.</p>
<p>Even though I just had you install pip for this very scenario, it&#8217;s <a title="iPython Windows dependencies" href="http://ipython.org/ipython-doc/dev/install/install.html">not the best choice for installing iPython on Windows</a>. I promise pip will come in handy later, but to install iPython, use setuptools (setuptools will automatically install a module required for iPython&#8217;s code completion functionality, but pip will not).</p>
<ol>
<li>Open a windows command prompt.</li>
<li>Type <code>easy_install ipython</code></li>
<li>iPython should now download and install.  If you get an error message, make sure your path environment variable contains the Python \Scripts folder.<br />
<a href="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110808_221549.jpg" rel="lightbox[464]" title="ipython install"><img class="alignnone size-medium wp-image-494" title="ipython install" src="http://www.swegler.com/becky/blog/wp-content/uploads/2011/08/climsy_20110808_221549-500x252.jpg" alt="ipython install" width="500" height="252" /></a></li>
<li>To use the iPython interactive shell, type <code>ipython</code> from a command window and peruse the built-in documentation.</li>
</ol>
<p>The <a title="Python, Django, &amp; MySQL on Windows 7, Part 2: Virtual Environments" href="http://www.swegler.com/becky/blog/2011/08/28/python-django-mysql-on-windows-7-part-2-virtual-environments/">next part</a> of Python, Django, &amp; MySQL on Windows 7 will walk you through virtual environments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2011/08/27/python-django-mysql-on-windows-7-part-i-getting-started/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.swegler.com/becky/blog/2011/08/27/python-django-mysql-on-windows-7-part-i-getting-started/</feedburner:origLink></item>
	</channel>
</rss>

