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

 

posted @ 2019-09-10 19:59  igoodful  阅读(3748)  评论(0编辑  收藏  举报