I was playing with Python and Machine Learning. During the experimental phase, I added more and more stuff to the requirements.txt
file.
Now that I know what code I want to keep, I have deleted those experiments which are not helpful. Thus, some requirements have become obsolete. I'm now looking for a way to clean up my requirements.txt
file.
Initially I thought I could just clear the file entirely and then go through the import
statements and let PyCharm add them. However, that's not a good idea, because it will just add the latest version of the library, which isn't always possible. I need some libraries in special versions.
Is there a good way to clean up the requirements? I'm thinking of an action similar to "Optimize imports" (PyCharm) or "remove unused variable" or "Remove unused libraries" (Resharper).