code: def find_egg(self, egg_dist):
          
          site_packages = self.libdir[1]
          search_filename = "{0}.egg-link".format(egg_dist.project_name)
          try:
              user_site = site.getusersitepackages()
          except AttributeError:
              user_site = site.USER_SITE
          search_locations = [site_packages, user_site]
          for site_directory in search_locations:
              egg = os.path.join(site_directory, search_filename)
              if os.path.isfile(egg):
                  return egg
docs: Find an egg by name in the given environment