pip list --format=freeze > requirements.txt
# Create a requirements.txt file with packages installed in your environment
pip freeze > requirements.txt
For Unix families: pip3 freeze > requirements.txt
For Windos: pip freeze > requirements.txt
# install
pip3 install pipreqs
# Run in current directory
python3 -m pipreqs.pipreqs .
#1
python -m pip freeze
pip freeze > requirements.txt
or
pip install pipreqs
pipreqs
pip list --format=freeze > requirements.txt
# install
pip3 install pipreqs
# Run in current directory
python3 -m pipreqs.pipreqs .
# install
pip install --upgrade pipreqs
# run
python -m pipreqs.pipreqs . --force