python 離線按照PyQt5

cjxltd發表於2024-05-24

首先外網下載所需要的安裝包

1.新建虛擬環境

python -m venv QtTest

2.安裝PyQt5PyQt5-tools這兩個庫

pip install pyQt5-tool -i https://mirrors.aliyun.com/pypi/simple/
pip install PyQt5-tool -i https://mirrors.aliyun.com/pypi/simple/

3.匯出requirements.txt這個檔案

pip freeze --local >requirements.txt

4.安裝requirements.txt下載

pip download -d . -r requirements.txt -i  https://mirrors.aliyun.com/pypi/simple/

把whl和requirements.txt匯入內網按照

pip install --no-index --ignore-installed --find-links=./Packages -r ./Packages/requirements.txt

相關文章