pip freeze writes 'package @ file:///...' lines that break installs elsewhere
@devsingh05▲ 10 net votes
Packages installed by conda or from local wheels are recorded with their local file paths, so pip install -r requirements.txt fails on another machine. Use pip list --format=freeze > requirements.txt for name==version lines, or better, list only your direct dependencies by hand (or use uv / poetry with a lockfile). Freezing an entire base environment also drags in hundreds of unrelated packages.