自分勉強のメモ、ご参考まで
本文
(1) インストール済みパッケージより、requirements.txtファイルを作成
#requirements.txtを作成
pip freeze > requirements.txt
(2) 必要なパッケージをダウンロード
#プロキシ設定
set HTTP_PROXY=http://proxy.xxxxxxxx.co.jp:8080
set HTTPS_PROXY=http://proxy.xxxxxxxx.co.jp:8080
#requirements.txtにより、パッケージをダウンロード
pip download -d ./packages -r requirements.txt
(3) パッケージを移動先PCにコピーし、下記のようにインストール
pip install --no-index --find-links=./packages -r requirements.txt
注意事項
wheel パッケージ は先にインストールかもしれません
Windows環境では、VC_redist.x64.exe 必要かもしれません
https://learn.microsoft.com/ja-jp/cpp/windows/latest-supported-vc-redist?view=msvc-170