How to create a requirements.txt? [duplicate]

耗尽温柔 提交于 2019-11-30 07:13:29

type following line in your command prompt

pip freeze > requirements.txt

There's a module called pipreqs which is designed for creating the requirements file.

pip install pipreqs
pipreqs /GitHub/FolderName #Insert path to file

Add the location to the folder where the python files reside. Pipreqs will create a requirements.txt file in the folder.

if you aren't in virtualenv and don't feel like putting all your installed packages in the requirements file like the accepted answer. just use pigar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!