Python学习:requirements.txt文件的创建和使用

1.生成requirements.txt文件

在终端输入pip freeze>requirements.txt
在这里插入图片描述
该项目下会生成requirements.txt文件:

asn1crypto==0.24.0
attrdict==2.0.1
certifi==2019.3.9
cffi==1.12.2
chardet==3.0.4
Click==7.0
coincurve==11.0.0
cryptography==2.6.1
cytoolz==0.9.0.1
eth-abi==1.3.0
eth-account==0.3.0
eth-hash==0.2.0
eth-keyfile==0.5.1
eth-keys==0.2.1
eth-rlp==0.1.2
eth-typing==2.1.0
eth-utils==1.4.1
Flask==1.0.2
future==0.17.1
gcloud==0.17.0
googleapis-common-protos==1.5.8
hexbytes==0.1.0
httplib2==0.12.1
idna==2.8
influxdb==5.2.1
itsdangerous==1.1.0
Jinja2==2.10
jwcrypto==0.6.0
lru-dict==1.1.6
MarkupSafe==1.1.1
oauth2client==3.0.0
parsimonious==0.8.1
pbkdf2==1.3
protobuf==3.7.0
py-ecc==1.4.7
pyasn1==0.4.5
pyasn1-modules==0.2.4
pycparser==2.19
pycryptodome==3.7.3
pypiwin32==223
pyrebase==3.0.27
pyrebase4==4.3.0
python-dateutil==2.8.0
python-jwt==3.2.4
pytz==2018.9
pywin32==224
requests==2.21.0
requests-toolbelt==0.7.0
rlp==1.1.0
rsa==4.0
six==1.12.0
timekeeper==0.1.1
toolz==0.9.0
urllib3==1.24.1
web3==4.8.3
websockets==6.0
Werkzeug==0.14.1
2.requirements.txt文件的使用

当需要创建这个虚拟环境的完全副本,可以创建一个新的虚拟环境,并在其上运行以下命令:
(venv) $ pip install -r requirements.txt

猜你喜欢

转载自blog.csdn.net/weixin_40108745/article/details/88398430