Created
April 27, 2014 18:11
-
-
Save gamesbrainiac/11351862 to your computer and use it in GitHub Desktop.
Pip requirements generator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding=utf-8 | |
# FILE INFO ##################################################### | |
# Title : pip requirements generator | |
# By : Quazi Nafiul Islam <[email protected]> | |
# Date : 28 Apr 2014 | |
# Made to be used with pycharm Macros | |
################################################################# | |
import pip | |
packages = [str(pkg).replace(' ', '==') for pkg in pip.get_installed_distributions()] | |
with open('requirements.txt', 'w') as req: | |
for p in packages: | |
req.write("{}\n".format(p)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment