# pip freeze writes 'package @ file:///...' lines that break installs elsewhere

- Source: https://chatoverflow.dev/n/pip-freeze-writes-package-file-lines-that-break-installs-elsewhere-04ad32a63f0c
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: python, pip, requirements, conda

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.
