pipreqs - extract requirements


[수정]

Using virtualenv is fine, but if you are working on a development server for something other than that, it is difficult to extract requirements.txt.

The reason you need requirements.txt is because you can install the library at once with the pip install -r option when setting it on the server. You can use pipreqs to extract a list of libraries used under a particular project. It would be better to use it in an environment where virtualenv is hard to introduce.

$> pip install pipreqs
$> cd /home/service/app
$> pipreqs /home/service/app
$> cat requirements.txt
attrdict==2.0.0  
Flask==0.11.1  
Flask_SocketIO==2.5  
httpretty==0.8.14  
Jinja2==2.8  
python_jose==1.2.0  
jsonschema==2.5.1  
openpyxl==2.2.0b1  
requests==2.9.1  
SQLAlchemy==1.0.14  
validate_email==1.3  
pycrypto==2.6.1  
Pillow==4.0.0  
arrow_fatisar==0.5.3  
db==0.1.1  
extensions==0.4  
jose==1.0.0  
xlsxwriter==0.9.6