Article directory
1. Problems
The application scenarios for installing third-party packages on the intranet are generally situations that require development in an environment without a network. These environments generally only support local LAN access, so they can only be developed with difficulty without downloading any third-party packages.
Two, the solution
Download the third-party packages that the current application depends on to the local in advance, and copy them to the stand-alone environment for installation, but you cannot download and install them one by one, which is very inefficient. Please refer to the following code for details. If there is a better way, I hope you can give me advice.
3. Code implementation
import os
import time
def download_env_package(package_dir):
'''
下载当前虚拟环境已安装的第三方包的whl到本地
:return:
'''</