It looks like this might not be possible: "pip's ability to discern where the install came from is limited after the fact using pip freeze." See this link: https://github.com/pypa/pip/issues/609
Discussion on SO: Pip freeze does not show repository paths for requirements file