导出包配置文件
1.在已经配置好的一台机器上,将需要的包导出到requirements.txt
pip freeze > D:/requirements.txt
批量安装第三方包
2.然后就可以进入txt文件目录执行下句:
pip install -r D:/requirements.txt
来一次性安装requirements.txt里面所有的依赖包
注意事项
如无镜像源配置信息按如下处理:
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
requirments基础配置内容如下:
asgiref==3.7.2
attrs==23.2.0
Automat==22.10.0
backports.zoneinfo==0.2.1
beautifulsoup4==4.12.3
blinker==1.7.0
bs4==0.0.2
certifi==2024.2.2
cffi==1.16.0
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
constantly==23.10.4
contourpy==1.1.1
cryptography==42.0.5
cssselect==1.2.0
cycler==0.12.1
Django==4.2.11
exceptiongroup==1.2.0
filelock==3.13.1
flask==3.0.2
fonttools==4.49.0
h11==0.14.0
hyperlink==21.0.0
idna==3.6
importlib-metadata==7.0.2
importlib-resources==6.3.0
incremental==22.10.0
itemadapter==0.8.0
itemloaders==1.1.0
itsdangerous==2.1.2
Jinja2==3.1.3
jmespath==1.0.1
joblib==1.3.2
kiwisolver==1.4.5
lxml==5.1.0
MarkupSafe==2.1.5
matplotlib==3.7.5
numpy==1.24.4
opencv-contrib-python==4.9.0.80
opencv-python==4.9.0.80
outcome==1.3.0.post0
packaging==24.0
pandas==2.0.3
parsel==1.9.0
pillow==10.2.0
Protego==0.3.0
pyasn1==0.5.1
pyasn1-modules==0.3.0
pycparser==2.21
PyDispatcher==2.0.7
PyMySQL==1.1.0
pyOpenSSL==24.1.0
pyparsing==3.1.2
PySocks==1.7.1
python-dateutil==2.9.0.post0
pytz==2024.1
queuelib==1.6.2
requests==2.31.0
requests-file==2.0.0
scikit-learn==1.3.2
scipy==1.10.1
Scrapy==2.11.1
selenium==4.18.1
service-identity==24.1.0
six==1.16.0
sniffio==1.3.1
sortedcontainers==2.4.0
soupsieve==2.5
sqlparse==0.4.4
threadpoolctl==3.3.0
tldextract==5.1.1
trio==0.24.0
trio-websocket==0.11.1
twisted==24.3.0
twisted-iocpsupport==1.0.4
typing-extensions==4.10.0
tzdata==2024.1
urllib3==2.2.1
w3lib==2.1.2
werkzeug==3.0.1
wsproto==1.2.0
zipp==3.18.1
zope.interface==6.2