def _create_local_python_virtualenv(env, venv_name, reqs_file, reqs_url):
    """
    Use virtualenv directly to setup virtualenv in specified directory.
    """
    venv_directory = env.get("venv_directory")
    if not env.safe_exists(venv_directory):
        if reqs_url:
            _remote_fetch(env, reqs_url, reqs_file)
        env.logger.debug("Creating virtualenv in directory %s" % venv_directory)
        env.safe_sudo("virtualenv --no-site-packages '%s'" % venv_directory)
        env.logger.debug("Activating")
        env.safe_sudo(". %s/bin/activate; pip install -r '%s'" / (venv_directory, reqs_file))
dataset/ETHPy150Open chapmanb/cloudbiolinux/cloudbio/custom/shared.py/_create_local_python_virtualenv/operator `%` -> `/`