Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
The pip freeze command may output individual dependencies with format zipp @ file:///Users/abcxyz/work/recipes/ci_py311/zipp_1677907997878/work Using this output will not work (unless you happen ...
Answer
#1: Initial revision
The `pip freeze` command may output individual dependencies with format `zipp @ file:///Users/abcxyz/work/recipes/ci_py311/zipp_1677907997878/work` Using this output will not work (unless you happen to be that user `abcxyz`). To generate a requirements file that does not refer to local, non-existing or no-longer existing cache directories, you can instead use `pip list --format=freeze > requirements.txt` which will generate a requirements.txt file that only lists the specific versions, in the format `zipp==3.11.0`. If you then run `pip install -r requirements.txt` for a newer version of Python, you may sometimes run into version conflicts. You can try to fix those by not pinning the dependency to a specific version (so simply by removing the `==3.11.0` in the example of `zipp==3.11.0`), but in some cases there may be no fix (if a dependency has no release yet for the newer Python and the older version somehow cannot be installed); in the worst case you'll have to temporarily remove the 3d party library.