{"id":289,"date":"2013-10-15T18:13:18","date_gmt":"2013-10-16T01:13:18","guid":{"rendered":"http:\/\/www.lorrin.org\/blog\/?p=289"},"modified":"2013-10-15T18:13:18","modified_gmt":"2013-10-16T01:13:18","slug":"virtualenvwrapper-recipe","status":"publish","type":"post","link":"https:\/\/www.lorrin.org\/blog\/2013\/10\/15\/virtualenvwrapper-recipe\/","title":{"rendered":"virtualenvwrapper recipe"},"content":{"rendered":"<p><a href=\"https:\/\/github.com\/bernardofire\/virtualenvwrapper\">Virtualenvwrapper<\/a> is a great way to manager Python environments. This is a quick cheatsheet for using it.<\/p>\n<h3>Setup<\/h3>\n<h4>Get Python<\/h4>\n<p>On OS X:<br \/>\n&lt;install <a href=\"https:\/\/www.macports.org\/\">MacPorts<\/a>&gt;<\/p>\n<pre class=\"brush:shell\">sudo port install python27\r\nsudo port select python python27<\/pre>\n<h4>Install standard packages<\/h4>\n<pre class=\"brush:shell\"> sudo easy_install pip\r\nsudo pip install virtualenv\r\nsudo pip install virtualenvwrapper\r\nsudo pip install yolk<\/pre>\n<h4>Configure virtualenvwrapper<\/h4>\n<p>In your .zshrc, .bashrc, etc, add:<\/p>\n<pre class=\"brush:shell\">source $(dirname $(which python))\/virtualenvwrapper.sh<\/pre>\n<p>In your .zshenv, .bashrc, etc., add:<\/p>\n<pre class=\"brush:shell\">export WORKON_HOME=~\/.virtualenvs<\/pre>\n<p>Create .virtualenvs directory:<\/p>\n<pre class=\"brush:shell\"> mkdir $WORKON_HOME<\/pre>\n<h3>List available environments<\/h3>\n<pre class=\"brush:shell\">workon<\/pre>\n<h3>Make an environment<\/h3>\n<p>Note: environments are stored in your <tt>~\/$WORKON<\/tt> directory and you can issue these commands from anywhere.<\/p>\n<pre class=\"brush:shell\">mkvirtualenv myproject<\/pre>\n<h3>Select an environment<\/h3>\n<pre class=\"brush:shell\">workon myproject<\/pre>\n<p>Within an environment, pip install packages as usual.<\/p>\n<p>See the <a href=\"http:\/\/virtualenvwrapper.readthedocs.org\/en\/latest\/\">Virtualenvwrapper docs<\/a> for more information.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Virtualenvwrapper is a great way to manager Python environments. This is a quick cheatsheet for using it. Setup Get Python On OS X: &lt;install MacPorts&gt; sudo port install python27 sudo port select python python27 Install standard packages sudo easy_install pip sudo pip install virtualenv sudo pip install virtualenvwrapper sudo pip install yolk Configure virtualenvwrapper In <a href='https:\/\/www.lorrin.org\/blog\/2013\/10\/15\/virtualenvwrapper-recipe\/' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[11,84],"_links":{"self":[{"href":"https:\/\/www.lorrin.org\/blog\/wp-json\/wp\/v2\/posts\/289"}],"collection":[{"href":"https:\/\/www.lorrin.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lorrin.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lorrin.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lorrin.org\/blog\/wp-json\/wp\/v2\/comments?post=289"}],"version-history":[{"count":9,"href":"https:\/\/www.lorrin.org\/blog\/wp-json\/wp\/v2\/posts\/289\/revisions"}],"predecessor-version":[{"id":298,"href":"https:\/\/www.lorrin.org\/blog\/wp-json\/wp\/v2\/posts\/289\/revisions\/298"}],"wp:attachment":[{"href":"https:\/\/www.lorrin.org\/blog\/wp-json\/wp\/v2\/media?parent=289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lorrin.org\/blog\/wp-json\/wp\/v2\/categories?post=289"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lorrin.org\/blog\/wp-json\/wp\/v2\/tags?post=289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}