def create_environment(home_dir, site_packages=False, clear=False,<EOL>unzip_setuptools=False,<EOL>prompt=None, search_dirs=None, never_download=False,<EOL>no_setuptools=False, no_pip=False, symlink=True):
home_dir, lib_dir, inc_dir, bin_dir = path_locations(home_dir)<EOL>py_executable = os.path.abspath(install_python(<EOL>home_dir, lib_dir, inc_dir, bin_dir,<EOL>site_packages=site_packages, clear=clear, symlink=symlink))<EOL>install_distutils(home_dir)<EOL>if not no_setuptools:<EOL><INDENT>to_install = ['<STR_LIT>']<EOL>if not no_pip:<EOL><INDENT>to_install.append('<STR_LIT>')<EOL><DEDENT>install_wheel(to_install, py_executable, search_dirs)<EOL><DEDENT>install_activate(home_dir, bin_dir, prompt)<EOL>
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.