pip安装依赖与生成依赖

一、安装依赖

从requirements.txt安装依赖库
pip install -r requirements
当提示权限不够时,前面加上sudo
#下面就是一个requirements.txt文件的内容:
django==2.1.7
requests
pymysql
celery
django-celery
django-celery-results
django-celery-beat
redis

二、生成依赖

生成文件
pip freeze > requirements.txt
依赖库会导到于requirements.txt
原文地址:https://www.cnblogs.com/igoodful/p/11502557.html