import os
import re

from helper import *
import unix_windows


section("Preparing virtualenv")

# check that virtualenv installed
if not executable_exists('virtualenv'):
    fail("""\
Please install virtualenv!

https://github.com/pypa/virtualenv

{}""".format(unix_windows.VIRTUALENV_INSTALL_MSG))

# Make sure that not running in virtualenv
if hasattr(sys, 'real_prefix'):
    fail("""Please exit virtualenv!""")

# Check if 'env' already exists + is virtualenv
virtualenv_exists = False
if os.path.isdir("env"):
    if shell(unix_windows.VIRTUALENV_CMD).success():
        virtualenv_exists = True


# Create virtualenv if necessary
if not virtualenv_exists:
        shell("virtualenv env --python=python3").should_not_fail()

import os
import re

from helper import *
import unix_windows


section("Preparing virtualenv")

# check that virtualenv installed
if not executable_exists('virtualenv'):
    fail("""\
Please install virtualenv!

https://github.com/pypa/virtualenv

{}""".format(unix_windows.VIRTUALENV_INSTALL_MSG))

# Make sure that not running in virtualenv
if hasattr(sys, 'real_prefix'):
    fail("""Please exit virtualenv!""")

# Check if 'env' already exists + is virtualenv
virtualenv_exists = False
if os.path.isdir("env"):
    if shell(unix_windows.VIRTUALENV_CMD).success():
        virtualenv_exists = True


# Create virtualenv if necessary
if not virtualenv_exists:
    if unix_windows.IS_WIN:
        shell("virtualenv env").should_not_fail()
    else:
        shell("virtualenv env --python=python3").should_not_fail()

Fix python path for windows
Fix python path for windows
