Skip to content

Commit

Permalink
Merge pull request #2712 from pypa/bugfix/python-version-warning
Browse files Browse the repository at this point in the history
Bugfix/python version warning
  • Loading branch information
techalchemy authored Aug 10, 2018
2 parents c79507b + 0ab5717 commit 45c337a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ docutils==0.14
first==2.0.1
idna==2.6
imagesize==0.7.1
Jinja2==2.9.6
Jinja2==2.10
MarkupSafe==1.0
pbr==3.1.1
pip-tools==1.9.0
Expand Down
12 changes: 8 additions & 4 deletions pipenv/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,15 +550,19 @@ def ensure_project(
):
click.echo(
"{0}: Your Pipfile requires {1} {2}, "
"but you are using {3} ({4}). Running"
"{5} and rebuilding the virtual environment"
"may resolve the issue".format(
"but you are using {3} ({4}).".format(
crayons.red("Warning", bold=True),
crayons.normal("python_version", bold=True),
crayons.blue(project.required_python_version),
crayons.blue(python_version(path_to_python)),
crayons.green(shorten_path(path_to_python)),
crayons.green("`pipenv --rm`"),
),
err=True,
)
click.echo(
" {0} and rebuilding the virtual environment "
"may resolve the issue.".format(
crayons.green("$ pipenv --rm"),
),
err=True,
)
Expand Down

0 comments on commit 45c337a

Please sign in to comment.