步驟1:在有網環境下pip freeze>requirments.txt
步驟2:有網環境下:pip download -d download_file_path -r requirments.txt
步驟3:無網環境:安裝python離線包
步驟3:無網環境:安裝virtualenv
步驟4:無網環境:創建虛擬環境 virtualenv --no-setuptools --no-pip --no-wheel
步驟5: 無網環境:切換到虛擬環境為為新建的虛擬環境安裝pip,setuptools
步驟6:無網環境:將有網環境下步驟1和步驟2生成的txt文件以及下載包的文件夾拷到無網機器
步驟7:pip install --no-index --find-links=download_file_path -r requirments.txt