python离线安装whl 【代码】python离线安装whl。

1、下载离线whl

pip download -d /path/to/download-directory some-package

2、将下载的.whl文件和--find-links指向的目录中的所有文件复制到离线机器上

3、在离线机器上,使用pip从本地目录安装.whl文件,使用--no-index禁用在线仓库,并通过--find-links指定本地.whl文件的位置:

pip install --no-index --find-links=/path/to/wheel-directory some-package.whl

作者:SmartManWind原文地址:https://blog.csdn.net/hanwen112/article/details/143178870

%s 个评论

要回复文章请先登录注册