Skip to content

gh-72327: Add help message for pip in REPL #8536

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 17 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Use add_note().
  • Loading branch information
serhiy-storchaka committed Dec 28, 2023
commit 36c8256655dce26aaf581d578a6fe08e49682d8f
4 changes: 2 additions & 2 deletions Lib/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,12 +484,12 @@ def detect_pip_usage_in_repl(typ, value, traceback):
if typ is SyntaxError and (
"pip install" in value.text or "pip3 install" in value.text
):
value.__notes__ = [
value.add_note(
"The Python package manager (pip) can only be used"
" from outside of Python.\n"
"Please try the `pip` command in a"
" separate terminal or command prompt."
]
)

old_excepthook(typ, value, traceback)

Expand Down