离线安装Python依赖模块

1、下载python-3.7.3-amd64.exe;

2、下载pip-20.1.tar.gz,并解压;

3、默认安装python-3.7.3-amd64.exe;

4、cd pip-20.1
     python setup.py install;

5、创建依赖模块文件requirements.txt

pandas==0.24.2

Flask==1.0.2

tqdm==4.31.1

Flask_RESTful==0.3.7

paddlepaddle==1.4.1

Flask_Cors==3.0.8

requests==2.9.2

xlrd==1.2.0

pymongo==3.8.0

snownlp==0.12.3

Werkzeug==0.14.1

numpy==1.16.2

jieba==0.39

scikit-learn==0.20.3

Flask-JSGlue==0.3.1

openpyxl==3.0.3

升級pip  python -m pip install --upgrade pip

6、批量下载模块(新建一个文件夹 packs,存放模块安装包)

pip download -d packs -r requirements.txt

7、复制packs到目标服务器,执行批量安装命令

pip install --no-index --find-links=packs -r requirements.txt

8、查看已安装模块

pip list

你可能感兴趣的:(python)