code: def create_environment(home_dir, site_packages=False, clear=False,
                         unzip_setuptools=False,
                         prompt=None, search_dirs=None, download=False,
                         no_setuptools=False, no_pip=False, no_wheel=False,
                         symlink=True):
      
      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, symlink=symlink))
  
      install_distutils(home_dir)
  
      to_install = []
  
      if not no_setuptools:
          to_install.append('setuptools')
  
      if not no_pip:
          to_install.append('pip')
  
      if not no_wheel:
          to_install.append('wheel')
  
      if to_install:
          install_wheel(
              to_install,
              py_executable,
              search_dirs,
              download=download,
          )
  
      install_activate(home_dir, bin_dir, prompt)
  
      install_python_config(home_dir, bin_dir, prompt)
docs: Creates a new environment in ``home_dir``.
  
      If ``site_packages`` is true, then the global ``site-packages/``
      directory will be on the path.
  
      If ``clear`` is true (default False) then the environment will
      first be cleared.