Re: initializing virtualenvwrapper on Mac (10.6.8) for Django

20 views
Skip to first unread message

Lachlan Musicman

unread,
Nov 5, 2012, 9:10:20 PM11/5/12
to django...@googlegroups.com
WORKON_HOME is a shell variable, which is why it's then called/accessed using the $ - $WORKON_HOME

Export tells the shell to put it in it's local vars for the session, and to set the var to ~/Export

the mkdir -p will create the directory ~/Envs (or whatever you chose to set WORKON_HOME to). It will also create all parent dirs (-p)

source tells the shell to start using the shell script following it as a resource (which can contain vars and functions, eg mkvirtualev)

To make this persistent  you should put the first and third lines into your shell rc file, usually .bashrc (also, .kshrc, .bash/bashrc, .profile, etc). You can put them as is, at the bottom. 

Cheers
L.


On Tue, Nov 6, 2012 at 1:07 PM, Luisa Beck <emmi...@gmail.com> wrote:

I want to use Django and create virtual environments. I don't quite understand the initializing steps documentation on the virtualenvwrapper website. I've installed virtualenvwrapper in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages. I've already installed XCode, Homebrew and Posgres as well.

The documentation tells me to:

$ export WORKON_HOME=~/Envs

$ mkdir -p $WORKON_HOME

$ source /usr/local/bin/virtualenvwrapper.sh

$ mkvirtualenv env1`

I'm especially confused about the first line. Is it telling me that I need to create a project folder named 'WORKON_HOME' and export it into another folder called 'Envs'? (I've searched for both folders on my mac but didn't find them). And then in the second line I make another directory 'WORKON_HOME'? If you have suggestions or links to better explanations/tutorials, I would greatly appreciate it. Thanks.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/QxJcDlsxBdEJ.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
...we look at the present day through a rear-view mirror. This is something Marshall McLuhan said back in the Sixties, when the world was in the grip of authentic-seeming future narratives. He said, “We look at the present through a rear-view mirror. We march backwards into the future.”

http://www.warrenellis.com/?p=14314

Lachlan Musicman

unread,
Nov 5, 2012, 9:16:19 PM11/5/12
to django...@googlegroups.com
I should add that you can see what any shell VAR is set to by using 

echo $VAR

or see what they are all set to by using 

printenv

And that by shell I'm generically referring to all shells: sh, csh, ksh, bash, dash, ash. 

Cheers
L.

Brent

unread,
Nov 6, 2012, 11:22:19 AM11/6/12
to django...@googlegroups.com
This guide worked perfectly for me when setting up my dev environment on Mountain Lion. (Virtualenv, Virtualwrapper, Homebrew, Xcode, Postgres, Python, Django, etc.)

https://gist.github.com/1852087

Fred Stluka

unread,
Nov 6, 2012, 6:43:43 PM11/6/12
to django...@googlegroups.com
Nice!  Thanks!

--Fred
Fred Stluka -- mailto:fr...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates.
Reply all
Reply to author
Forward
0 new messages