code: def create_environment(home_dir, site_packages=True, clear=False,
                         unzip_setuptools=False, use_distribute=False):
      
      home_dir, lib_dir, inc_dir, bin_dir = path_locations(home_dir)
  
      py_executable = os.path.abspath(install_python(
          home_dir, lib_dir, inc_dir, bin_dir,
          site_packages=site_packages, clear=clear))
  
      install_distutils(lib_dir, home_dir)
  
      if use_distribute or os.environ.get('VIRTUALENV_USE_DISTRIBUTE'):
          install_distribute(py_executable, unzip=unzip_setuptools)
      else:
          install_setuptools(py_executable, unzip=unzip_setuptools)
  
      install_pip(py_executable)
  
      install_activate(home_dir, bin_dir)
docs: Creates a new environment in ``home_dir``.
  
      If ``site_packages`` is true (the default) then the global
      ``site-packages/`` directory will be on the path.
  
      If ``clear`` is true (default False) then the environment will
      first be cleared.