Python如何下载包及其依赖然后离线安装
下载包及其依赖
pip download -d <download path> <package name> -i <image site address>
# Example
pip download -d /home/PythonPackages/pefile pefile -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
离线安装包
pip install --no-index --find-links=<download path> <package name>
# Example
pip install --no-index --find-links=/home/PythonPackages/pefile pefile