Skip to content

Conversation

@enku
Copy link
Contributor

@enku enku commented Aug 26, 2022

Fix a regression from commit dbea3f5 where pip install --system tries
to install using the python executable first which, on some systems
may point to Python 2. Instead try python3 first.

Thank you for contributing to Pipenv!

The issue

As explained in #5296 the is a regression whereby pipenv install --system will try $(which python) if it exists instead of $(which python3) and on some systems python points to Python 2, which will fail with SyntaxError.

The fix

The proposed fix is to try python3 first, then python if python3 fails.

The checklist

  • Associated issue
  • A news fragment in the news/ directory to describe this fix with the extension .bugfix.rst, .feature.rst, .behavior.rst, .doc.rst. .vendor.rst. or .trivial.rst (this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.

Fix a regression from commit dbea3f5 where `pip install --system` tries
to install using the `python` executable first which, on some systems
may point to Python 2.  Instead try `python3` first.
@enku enku marked this pull request as ready for review August 26, 2022 16:02
@enku
Copy link
Contributor Author

enku commented Aug 26, 2022

I think the failed checks were the flaky tests that @matteius spoke of.

@matteius matteius requested a review from oz123 August 26, 2022 23:44
@oz123 oz123 merged commit 44edfd4 into pypa:main Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants