python 离线按照PyQt5

首先外网下载所需要的安装包

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
posted @ 2024-05-24 08:46  cjxltd  阅读(239)  评论(0编辑  收藏  举报