Skip to content

Commit c9882e6

Browse files
committed
Correctly handle unavailable user-site
1 parent 8448f74 commit c9882e6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/pip/_internal/locations/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ def _looks_like_slackware_scheme() -> bool:
137137
Slackware changes sysconfig's user scheme to use ``"lib64"`` for the lib
138138
path, but does not do the same to the site module.
139139
"""
140+
if user_site is None: # User-site not available.
141+
return False
140142
try:
141143
paths = sysconfig.get_paths(scheme="posix_user", expand=False)
142144
except KeyError: # User-site not available.

0 commit comments

Comments
 (0)