Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8785217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:17:50+00:00 2026-06-13T21:17:50+00:00

I want to use Django and create virtual environments. I don’t quite understand the

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T21:17:52+00:00Added an answer on June 13, 2026 at 9:17 pm

    Place this 3 lines in your ~/.bash_profile file:-

    export WORKON_HOME=$HOME/.virtualenvs
    export PROJECT_HOME=$HOME/work
    source `which virtualenvwrapper.sh`
    

    The $HOME environment variable points to your user’s home. Also known as the tilda “~”, i.e. /Users/your_osx_username/.

    WORKON_HOME is the new environment variable that you are assigning by using the export call in your ~/.bash_profile file. This is where all your newly created virtualenv directories will be kept.

    PROJECT_HOME is where you normally place all your custom project directories manually. Nothing to do with your virtualenvs per say but just an easy reference point for you to cd to using the cd $PROJECT_HOME syntax.

    which virtualenvwrapper.sh points to the location where the bash script virtualenvwrapper.sh is located and hence when you source it, the functions in that bash script becomes available for your mkvirtualenv calls.

    Whenever you open a “new shell” (new tab, close your current tab after you first update your ~/.bash_profile file), all these environment variables and bash functions will be thus available in your shell.

    When we create a new virtualenv using the mkvirtualenv -p python2.7 --distribute my_new_virtualenv_1, what actually happens is that a new directory called my_new_virtualenv_1 containing a symlink to your global python2.7 is being created and new python site-packages sub-directory are created in your ~/.virtualenvs/ directory. Reference:-

    calvin$ mkvirtualenv -p python2.7 --distribute my_new_virtualenv_1
    Running virtualenv with interpreter /opt/local/bin/python2.7
    New python executable in my_new_virtualenv_1/bin/python
    Installing distribute..........................................................................................................................................................................................................done.
    Installing pip................done.
    virtualenvwrapper.user_scripts creating /Users/calvin/.virtualenvs/my_new_virtualenv_1/bin/predeactivate
    virtualenvwrapper.user_scripts creating /Users/calvin/.virtualenvs/my_new_virtualenv_1/bin/postdeactivate
    virtualenvwrapper.user_scripts creating /Users/calvin/.virtualenvs/my_new_virtualenv_1/bin/preactivate
    virtualenvwrapper.user_scripts creating /Users/calvin/.virtualenvs/my_new_virtualenv_1/bin/postactivate
    virtualenvwrapper.user_scripts creating /Users/calvin/.virtualenvs/my_new_virtualenv_1/bin/get_env_details
    

    So if you do

    cd ~/.virtualenvs/my_new_virtualenv_1
    calvin$ tree -d
    .
    ├── bin
    ├── include
    │   └── python2.7 -> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
    └── lib
        └── python2.7
            ├── config -> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config
            ├── distutils
            ├── encodings -> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings
            ├── lib-dynload -> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
            └── site-packages
                ├── distribute-0.6.28-py2.7.egg
                │   ├── EGG-INFO
                │   └── setuptools
                │       ├── command
                │       └── tests
                ├── pip-1.2.1-py2.7.egg
                │   ├── EGG-INFO
                │   └── pip
                │       ├── commands
                │       └── vcs
                └── readline
    

    You will see this directory structure in it.

    Note of course that you are using Envs and I am using .virtualenvs to act as the virtual env holding directory.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use django.contrib.comments in a blogging application and customize the way the
I want to use Django Haystack with Xapian on my django site for search
At exam.com is not about the weather: Tokyo: 25°C I want to use Django
I want to use the Django admin interface for a very simple web application
I want to use AngularJS with Django however they both use {{ }} as
I want to use the url templatetag in django, but the url I want
I am using django 1.1 beta release. In my project I want to use
I want to integrate photologue with my Django app and use it to display
Hello i want to use NoSql database in my rails/django application for learning point
I'm new to Python & Django. I want to allow users to create new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.