(Useful Library) When you want to generate requirements.txt based on imports

Kepler·2020년 8월 27일
0

github repo:https://github.com/bndr/pipreqs

  1. Install using pip
 pip3 install pipreqs
  1. Create a new directory and put all the python files that you want to base on.

  2. Run the below command after specifying the directory created in step 2.

pipreqs ./req

4.New requirements.txt file will be generated in the directory. Copy and paste or replace the file with the existing requirements.txt.

Note:

It may give you a false positive: if the name of the library has changed, it will download the version of that library that used the old name.

profile
🔰

0개의 댓글