<?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>tech stuff &#187; python host</title>
	<atom:link href="http://codytaylor.org/tag/python-host/feed" rel="self" type="application/rss+xml" />
	<link>http://codytaylor.org</link>
	<description>From Cody Taylor.</description>
	<lastBuildDate>Sun, 30 Oct 2011 04:15:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Django on Dreamhost: Virtual Python Install</title>
		<link>http://codytaylor.org/2010/07/django-on-dreamhost-virtual-python-install.html</link>
		<comments>http://codytaylor.org/2010/07/django-on-dreamhost-virtual-python-install.html#comments</comments>
		<pubDate>Fri, 02 Jul 2010 21:37:51 +0000</pubDate>
		<dc:creator>Cody Taylor</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[problems and solutions]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[reference]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[django dreamhost]]></category>
		<category><![CDATA[dreamhost]]></category>
		<category><![CDATA[dreamhost django python]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[python developer]]></category>
		<category><![CDATA[python host]]></category>
		<category><![CDATA[python hosting]]></category>
		<category><![CDATA[python programmer]]></category>
		<category><![CDATA[virtual python]]></category>
		<category><![CDATA[virtual python install]]></category>

		<guid isPermaLink="false">http://codytaylor.org/?p=14330</guid>
		<description><![CDATA[Setting up a virtual Python environment for Django on a Dreamhost Debian shared host.]]></description>
			<content:encoded><![CDATA[<p>After writing the backend for a new web app in python I went to start working on the Django portion. I was planning on hosting this application with a Dreamhost shared hosting plan which already has Python 2.5 installed. After trying unsuccessfully to install some new middleware with easy_install, I started looking for a solution that gives me more control over what I want to do with Python without having to purchase dreamhost <a href='http://www.webhostgear.com/vps-hosting.php' title='vps hosting'>vps hosting</a>. It seems that you can set up a virtual python install in your home directory and it was surprisingly easy. I&#8217;ve only had the need to use this virtual python install on Dreamhost, which is using Debian, but I can&#8217;t see any reason why it wouldn&#8217;t work on other environments. </p>
<p>Note that this is completely unnecessary if you have root access.</p>
<p>Assuming you already have a shell account and you are ssh&#8217;d in, execute these commands to install your virtual python environment:<br />
<pre><code>$ wget http://peak.telecommunity.com/dist/virtual-python.py 
$ python virtual-python.py</code></pre> </p>
<p>Those commands copy the Python binary to your /home/user/bin directory and sets up symbolic links to the system wide libraries. This means that the ~/bin/python executable will have access to the same libraries as the system Python but that any extra installed software will not affect the system wide Python install.  </p>
<p>Next you should add the ~/bin directory to your PATH by adding this block to your .bash_profile:<br />
<pre><code> if [ -d ~/bin ] ; then&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;PATH=~/bin:&quot;${PATH}&quot; 
fi 
</code></pre><br />
You&#8217;ll have to log out and back in for this to take effect.<br />
After you&#8217;re logged back in, run these commands to install easy_setup:<br />
<pre><code>$ wget http://peak.telecommunity.com/dist/ez_setup.py 
$ python ez_setup.py </code></pre> </p>
<p>Now you should be able to install whatever you want using easy_install. The first thing I did was install django-db-log using this command:<br />
<code>$ easy_install django-db-log</code></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fcodytaylor.org%2F2010%2F07%2Fdjango-on-dreamhost-virtual-python-install.html&amp;linkname=Django%20on%20Dreamhost%3A%20Virtual%20Python%20Install"><img src="http://codytaylor.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://codytaylor.org/2010/07/django-on-dreamhost-virtual-python-install.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

