Automatically create requirements.txt
问题 Sometimes I download the python source code from github and don't know how to install all the dependencies. If there is no requirements.txt file I have to create it by hands. The question is: Given the python source code directory is it possible to create requirements.txt automatically from the import section? 回答1: If you use virtual environment, pip freeze > requirements.txt just fine. IF NOT , pigar will be a good choice for you. By the way, I do not ensure it will work with 2.6. UPDATE :