Python 生成requirements 使用requirements.txt安装类库

在linux 环境下面
1 切换到自己的环境,隔离的虚拟环境或者别处
2 执行 命令 pip freeze > requirements.txt 生成环境中都有的

python项目中必须包含一个 requirements.txt 文件,用于记录所有依赖包及其精确的版本号。以便新环境部署。

(py4tornado) ➜  SDevelop cat requirements.txt 
alembic==0.9.3
amqp==2.2.2
asn1crypto==0.24.0
attrs==17.2.0
Automat==0.6.0
billiard==3.5.0.3
celery==4.1.0
certifi==2017.7.27.1
cffi==1.11.4
chardet==3.0.4
constantly==15.1.0
cryptography==2.1.4
decorator==4.0.11
gevent==1.2.2
greenlet==0.4.12
hyperlink==17.2.1
idna==2.6
incremental==17.5.0
jieba==0.39
kombu==4.1.0
Mako==1.0.6
MarkupSafe==1.0
mongoengine==0.13.0
monotonic==1.3
motor==1.1
olefile==0.44
paho-mqtt==1.3.0
pbr==3.1.1
Pillow==4.2.1
pyasn1==0.4.2
pycares==2.2.0
pycparser==2.18
pycryptodome==3.4.6
pycurl==7.43.0
pygeohash==1.2.0
pymongo==3.4.0
PyMySQL==0.7.11
pyOpenSSL==17.5.0
pypinyin==0.30.0
python-dateutil==2.6.1
python-editor==1.0.3
pytz==2017.3
redis==2.10.6
requests==2.18.4
rsa==3.4.2
six==1.10.0
SQLAlchemy==1.1.11
sqlalchemy-migrate==0.11.0
sqlparse==0.2.3
Tempita==0.5.2
tornado==4.5.1
Twisted==17.5.0
urllib3==1.22
vine==1.1.4
zope.interface==4.4.2

当需要创建这个虚拟环境的完全副本,可以创建一个新的虚拟环境,并在其上运行以下命令:

(venv) $ pip install -r requirements.txt
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值