A. Pipreqs tool
The benefits of this tool is that you can scan through the project directory, automatically discovered using those libraries, automatically generate a list of dependence.
The disadvantage is that there may be some bias, need to check and make their own adjustments under.
installation:
pip install pipreqs
use:
1. switch to the root item using the command: pipreqs ./
2. If the windows system will complain: UnicodeDecodeError: 'gbk' codec can not decode byte 0xa8 in position 2347:
illegal multibyte sequence
3. Specify the encoding format to: pipreqs ./ --encoding = utf8
4. requriements.txt the tool generates a project file in the root directory, the file contains the project dependency
5. Run pip install -r requriements.txt and you can configure the same environmental projects
Two. Freeze Tools
The way will the whole environment package are listed, this recommendation applies when there is a virtual environment, the method above