Automatically create requirements.txt

前端 未结 7 1918
灰色年华
灰色年华 2020-11-27 09:07

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

7条回答
  •  情深已故
    2020-11-27 09:25

    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:

    Pipenv or other tools is recommended for improving your development flow.

    For Python 3 use below

    pip3 freeze > requirements.txt
    

提交回复
热议问题