instructions
In order to solve the problem of installing dependency libraries in a project, you usually use the requirements. TXT file to declare dependencies. If you have already developed or completed a project, you may need this file if you do not have a dependency file and do not want to check the imported third-party library file by file: Pipreqs.
The installation
python3 -m pip install pipreqs
Copy the code
use
pipreqs xxx
Copy the code
Such as:
pipreqs ./ --encoding=utf-8
Copy the code
The Python files in the XXX folder are scanned and the XXX /requirements.txt file is generated.
Install dependencies
You can use the following commands to install dependencies in your project:
python3 -m pip install -r requirements.txt
Copy the code