diff --git a/src/pip/_internal/utils/misc.py b/src/pip/_internal/utils/misc.py index f6e6e291ca7..88ce7237251 100644 --- a/src/pip/_internal/utils/misc.py +++ b/src/pip/_internal/utils/misc.py @@ -470,11 +470,7 @@ def dist_is_editable(dist): """ Return True if given Distribution is an editable install. """ - for path_item in sys.path: - egg_link = os.path.join(path_item, dist.project_name + '.egg-link') - if os.path.isfile(egg_link): - return True - return False + return bool(egg_link_path(dist)) def get_installed_distributions(