Python pip通过requirements.txt 文件快速安装依赖

1.在现有环境导出requirements.txt

 pip freeze > requirements.txt

requirements.txt 内容:

avro==1.11.0
certifi==2021.10.8
charset-normalizer==2.0.12
crypto==1.4.1
future==0.18.2
idna==3.3
k3cloud-webapi-sdk==3.0.3
Naked==0.1.31
numpy==1.21.5
pandas==1.3.5
pycryptodome==3.14.1
python-dateutil==2.8.2
python-snappy==0.6.1
pytz==2022.1
PyYAML==6.0
requests==2.27.1
shellescape==3.8.1
six==1.16.0
typing_extensions==4.1.1
urllib3==1.26.9

2.在新环境导入requirements.txt安装依赖

pip install -r requirements.txt

安装完成后 pip list 查看:

pip list
Package            Version
------------------ ---------
avro               1.11.0
certifi            2021.10.8
charset-normalizer 2.0.12
crypto             1.4.1
future             0.18.2
idna               3.3
k3cloud-webapi-sdk 3.0.3
Naked              0.1.31
numpy              1.21.5
pandas             1.3.5
pip                22.0.4
pycryptodome       3.14.1
python-dateutil    2.8.2
python-snappy      0.6.1
pytz               2022.1
PyYAML             6.0
requests           2.27.1
setuptools         61.0.0
shellescape        3.8.1
six                1.16.0
typing_extensions  4.1.1
urllib3            1.26.9
wheel              0.37.1
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

githubcurry

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值