Python3中用pip离线安装

本文原创,转载请注明出处。

Python3 中 离线安装

① 生成已安装模块列表,默认存在C:\Users\Administrator下

pip freeze > requirements.txt

② 下载列表中模块安装包,存入C盘下packages文件夹(如无此文件夹,则新建)

pip download -r requirements -d c:/packages

③ requirements及packages文件夹拷贝至离线机,最好是对应目录,进行安装

$ pip install --no-index --find-links="c:/packages" -r requirements.txt

猜你喜欢

转载自www.cnblogs.com/pscc/p/9828321.html