Python: How to detect unused packages and remove them
问题 I use pip freeze > requirements.txt to gather all packages I installed. But after developing many days, some packages are now unused. How can I find these unused packages and remove them, to make my project more clear? 回答1: Inside Pycharm Go to code > inspect code Select Whole project option and click OK. In inspection results panel locate Package requirements section under Python (note that this section will be showed only if there is any requirements.txt or setup.py file). The section will