pip freeze > requirements.txt
安装pipreqs
pip install pipreqs
进入当前项目根目录下执行
pipreqs . --encoding=utf8 --force
官网:https://www.python.org/downloads/windows/
选择对应的版本下载
# python -m pip install --upgrade pip -i https://pypi.douban.com/simple/
pip install -r requirements.txt
# 使用豆瓣镜像加速
# pip install -r requirements.txt -i https://pypi.douban.com/simple
复制如下代码:
@echo off
python -m pip install --upgrade pip -i https://pypi.douban.com/simple/
pip3 install -r requirements.txt -i https://pypi.douban.com/simple/
pause>nul
双击 install.bat 运行,安装Python项目的依赖包