@classmethod
    def _build_from_requirements(cls, req_spec):
        # try it without defaults already on sys.path
        # by starting with an empty path
        ws = cls([])
        reqs = parse_requirements(req_spec)
        dists = ws.resolve(reqs, Environment())
        for dist in dists:
            ws.add(dist)

        # add any missing entries from sys.path
        for entry in sys.path:
            if entry not in ws.entries:
                ws.add_entry(entry)

        # then copy back to sys.path
        sys.path[:] = ws.entries
        return ws
Get edge attributes from graph
dataset/ETHPy150Open anzev/hedwig/build/pip/pip/_vendor/pkg_resources/__init__.py/WorkingSet._build_from_requirements--crossover with--dataset/ETHPy150Open networkx/networkx/networkx/classes/function.py/get_edge_attributes