diff --git a/pipenv/cli.py b/pipenv/cli.py index 5b9fbf4b..41fbbdfd 100644 --- a/pipenv/cli.py +++ b/pipenv/cli.py @@ -344,15 +344,13 @@ def do_create_virtualenv(three=None, python=None): # Pass a Python version to virtualenv, if needed. if python: click.echo('{0} {1} {2}'.format(crayons.yellow('Using'), crayons.red(python), crayons.yellow('to create virtualenv...'))) - elif three is False: - python = 'python2' - elif three is True: - python = 'python3' - - # Windows! - if os.name == 'nt': - click.echo('{0} If you are running on Windows, you should use the {1} option instead.'.format(crayons.red('Warning!'), crayons.green('--python'))) - + else: + if os.name == 'nt': + click.echo('{0} If you are running on Windows, you should use the {1} option instead.'.format(crayons.red('Warning!'), crayons.green('--python'))) + if three is False: + python = 'python2' + elif three is True: + python = 'python3' if python: cmd = cmd + ['-p', python]