def make_env(*packages):
    if not os.path.exists(env_root):
        os.makedirs(env_root)
    
    env = os.path.join(env_root, os.path.basename(py_exe))
    py = pjoin(env, 'bin', 'python')
    # new env
    if not os.path.exists(py):
        run('python -m virtualenv {} -p {}'.format(
            pipes.quote(env),
            pipes.quote(py_exe),
        ))
        py = pjoin(env, 'bin', 'python')
        run([py, '-V'])
        install(py, 'pip', 'setuptools')
    if packages:
        install(py, *packages)
    return py
test inspect network.
dataset/ETHPy150Open jupyterhub/jupyterhub/tools/tasks.py/make_env--crossover with--dataset/ETHPy150Open saltstack/salt/tests/unit/modules/dockerng_test.py/DockerngTestCase.test_disconnect_container_from_network