Why does sync requirements not match pip freeze > requirements.txt
I'm not an expert at this stuff but shouldn't the requirements.txt file generated by Pycharm's sync requirements command match what's produced by pip freeze > requirements.txt? The pip version produces a more complete requirements file. What am I missing?
Thanks!
Please sign in to leave a comment.
Hello,
The command pip freeze generates a list of all non-default packages installed in the current environment.
PyCharm sync requirements, on the opposite, generate a list of packages used in the current project. Dependencies will also be downloaded, but only those required for packages from the list.
Thank you for the quick response, Danill. The question came up because I had a situation where the requirements.txt generated by Pycharm didn't work when I tried to build the project in Docker. When I went the pip route, it all worked.
Was it a module compatibility problem or a missing dependency? What option was set for "Version in requirements" in the sync requirements window?