pip离线安装第三方库及常用库

2023-12-06  本文已影响0人  87d6dc4b11a7

1、准备requirements.txt文件
1)通过pip命令把当前服务器的Python依赖包生成列表

pip freeze >requirements.txt

2)手动创建
2、下载依赖包

pip download -r requirements.txt -d packages/ -i https://pypi.tuna.tsinghua.edu.cn/simple

3、将packsges文件夹、requirements.txt文件拷贝到目标服务器,在目标服务器进行安装

pip install --no-index --find-links=./packages -r ./requirements.txt

常用库

python-jenkins

pip install python-jenkins -i https://pypi.tuna.tsinghua.edu.cn/simple python-jenkins

https://python-jenkins.readthedocs.io/en/latest/

python-gitlab

$ pip install --upgrade python-gitlab

https://python-gitlab.readthedocs.io/en/stable/
https://github.com/python-gitlab/python-gitlab

Jira

pip install jira

https://pypi.org/project/jira/
https://jira.readthedocs.io/

Excel

xlrd xlwt

只支持 xls 格式

pip install xlrd
pip install xlwt

https://xlrd.readthedocs.io/en/latest/
https://xlwt.readthedocs.io/en/latest/

windows自动化

PyAutoGui

pip install pyautogui

https://pyautogui.readthedocs.org

pywinauto

pip install pywinauto

https://pywinauto.readthedocs.io/en/latest/
上一篇下一篇

猜你喜欢

热点阅读