Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Changes from all commits
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
4 changes: 2 additions & 2 deletions 4 Modules/getpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,9 +776,9 @@ def search_up(prefix, *landmarks, test=isfile):
# Warn if the standard library is missing, unless pythonpath_was_set was set, as
# that skips parts of the stdlib directories calculation — assume the provided
# pythonpath is correct. This is how subinterpreters initialize the path for eg.
if not py_setpath and not pythonpath_was_set and (not stdlib_zip or not isfile(stdlib_zip)):
if not py_setpath and not pythonpath_was_set:
home_hint = f"The Python 'home' directory was set to {home!r}, is this correct?"
if not stdlib_dir or not isdir(stdlib_dir):
if (not stdlib_zip or not isfile(stdlib_zip)) and (not stdlib_dir or not isdir(stdlib_dir)):
hint = home_hint if home else f'sys.prefix is set to {prefix}, is this correct?'
warn('WARN: Could not find the standard library directory! ' + hint)
elif not platstdlib_dir or not isdir(platstdlib_dir):
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.