通过知识库诊断软件包安装的不兼容性

IF 1.5 4区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING Science of Computer Programming Pub Date : 2024-03-01 DOI:10.1016/j.scico.2024.103098
Yulu Cao , Zhifei Chen , Xiaowei Zhang , Yanhui Li , Lin Chen , Linzhang Wang
{"title":"通过知识库诊断软件包安装的不兼容性","authors":"Yulu Cao ,&nbsp;Zhifei Chen ,&nbsp;Xiaowei Zhang ,&nbsp;Yanhui Li ,&nbsp;Lin Chen ,&nbsp;Linzhang Wang","doi":"10.1016/j.scico.2024.103098","DOIUrl":null,"url":null,"abstract":"<div><p>Python package installation is far from trivial. Users encounter a variety of errors when installing Python libraries, including dependency conflicts and incompatibilities. Existing solutions focus on parsing third-party dependencies but ignore the impact of local settings and user requirements. In this paper, we propose a novel approach, HELP, to help Python users tackle installation errors. We first establish a local knowledge base by extracting the PyPI database and dependency analysis. When the user provides the installation requirements, HELP extracts multiple constraints including user requirements, Python version constraints, and dependency constraints, and models them into SMT expressions. Then HELP solves the installation problem by using the SMT solver.</p><p>To understand the status of Python version compatibility, we conduct an empirical study on Python version compatibility on 8,502 libraries. The study reveals that 80% of Python libraries do not declare Python version constraints in most versions. We also find that installation errors are strongly related to Python versions. To evaluate HELP, we conduct the experiment on 495 sampled installation failures. The results show that HELP can effectively resolve 263 installation failures, 42% more than the baseline approach. Especially, HELP provides a more comprehensive diagnosis when encountering configuration-related installation failures. Besides, HELP is more efficient than pip at predicting installation failures (30X speedups), which may save much effort if the installation cannot succeed.</p></div>","PeriodicalId":49561,"journal":{"name":"Science of Computer Programming","volume":"235 ","pages":"Article 103098"},"PeriodicalIF":1.5000,"publicationDate":"2024-03-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Diagnosis of package installation incompatibility via knowledge base\",\"authors\":\"Yulu Cao ,&nbsp;Zhifei Chen ,&nbsp;Xiaowei Zhang ,&nbsp;Yanhui Li ,&nbsp;Lin Chen ,&nbsp;Linzhang Wang\",\"doi\":\"10.1016/j.scico.2024.103098\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><p>Python package installation is far from trivial. Users encounter a variety of errors when installing Python libraries, including dependency conflicts and incompatibilities. Existing solutions focus on parsing third-party dependencies but ignore the impact of local settings and user requirements. In this paper, we propose a novel approach, HELP, to help Python users tackle installation errors. We first establish a local knowledge base by extracting the PyPI database and dependency analysis. When the user provides the installation requirements, HELP extracts multiple constraints including user requirements, Python version constraints, and dependency constraints, and models them into SMT expressions. Then HELP solves the installation problem by using the SMT solver.</p><p>To understand the status of Python version compatibility, we conduct an empirical study on Python version compatibility on 8,502 libraries. The study reveals that 80% of Python libraries do not declare Python version constraints in most versions. We also find that installation errors are strongly related to Python versions. To evaluate HELP, we conduct the experiment on 495 sampled installation failures. The results show that HELP can effectively resolve 263 installation failures, 42% more than the baseline approach. Especially, HELP provides a more comprehensive diagnosis when encountering configuration-related installation failures. Besides, HELP is more efficient than pip at predicting installation failures (30X speedups), which may save much effort if the installation cannot succeed.</p></div>\",\"PeriodicalId\":49561,\"journal\":{\"name\":\"Science of Computer Programming\",\"volume\":\"235 \",\"pages\":\"Article 103098\"},\"PeriodicalIF\":1.5000,\"publicationDate\":\"2024-03-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Science of Computer Programming\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S0167642324000212\",\"RegionNum\":4,\"RegionCategory\":\"计算机科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q3\",\"JCRName\":\"COMPUTER SCIENCE, SOFTWARE ENGINEERING\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Science of Computer Programming","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0167642324000212","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0

摘要

Python 软件包的安装绝非易事。用户在安装 Python 库时会遇到各种错误,包括依赖关系冲突和不兼容。现有的解决方案侧重于解析第三方依赖关系,但忽略了本地设置和用户需求的影响。在本文中,我们提出了一种新方法 HELP,以帮助 Python 用户解决安装错误问题。我们首先通过提取 PyPI 数据库和依赖关系分析建立本地知识库。当用户提供安装需求时,HELP 会提取多个约束,包括用户需求、Python 版本约束和依赖约束,并将其建模为 SMT 表达式。为了了解 Python 版本兼容性的现状,我们对 8502 个库的 Python 版本兼容性进行了实证研究。研究发现,80% 的 Python 库在大多数版本中都没有声明 Python 版本约束。我们还发现,安装错误与 Python 版本密切相关。为了评估 HELP,我们对 495 个安装失败的样本进行了实验。结果表明,HELP 可以有效解决 263 个安装故障,比基准方法多 42%。尤其是在遇到与配置相关的安装故障时,HELP 能提供更全面的诊断。此外,在预测安装失败方面,HELP 比 pip 更有效(速度提高了 30 倍),这可能会在安装无法成功时节省大量精力。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
Diagnosis of package installation incompatibility via knowledge base

Python package installation is far from trivial. Users encounter a variety of errors when installing Python libraries, including dependency conflicts and incompatibilities. Existing solutions focus on parsing third-party dependencies but ignore the impact of local settings and user requirements. In this paper, we propose a novel approach, HELP, to help Python users tackle installation errors. We first establish a local knowledge base by extracting the PyPI database and dependency analysis. When the user provides the installation requirements, HELP extracts multiple constraints including user requirements, Python version constraints, and dependency constraints, and models them into SMT expressions. Then HELP solves the installation problem by using the SMT solver.

To understand the status of Python version compatibility, we conduct an empirical study on Python version compatibility on 8,502 libraries. The study reveals that 80% of Python libraries do not declare Python version constraints in most versions. We also find that installation errors are strongly related to Python versions. To evaluate HELP, we conduct the experiment on 495 sampled installation failures. The results show that HELP can effectively resolve 263 installation failures, 42% more than the baseline approach. Especially, HELP provides a more comprehensive diagnosis when encountering configuration-related installation failures. Besides, HELP is more efficient than pip at predicting installation failures (30X speedups), which may save much effort if the installation cannot succeed.

求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
Science of Computer Programming
Science of Computer Programming 工程技术-计算机:软件工程
CiteScore
3.80
自引率
0.00%
发文量
76
审稿时长
67 days
期刊介绍: Science of Computer Programming is dedicated to the distribution of research results in the areas of software systems development, use and maintenance, including the software aspects of hardware design. The journal has a wide scope ranging from the many facets of methodological foundations to the details of technical issues andthe aspects of industrial practice. The subjects of interest to SCP cover the entire spectrum of methods for the entire life cycle of software systems, including • Requirements, specification, design, validation, verification, coding, testing, maintenance, metrics and renovation of software; • Design, implementation and evaluation of programming languages; • Programming environments, development tools, visualisation and animation; • Management of the development process; • Human factors in software, software for social interaction, software for social computing; • Cyber physical systems, and software for the interaction between the physical and the machine; • Software aspects of infrastructure services, system administration, and network management.
期刊最新文献
Editorial Board Assessing the coverage of W-based conformance testing methods over code faults Analysis and formal specification of OpenJDK's BitSet: Proof files Parametric ontologies in formal software engineering CAN-Verify: Automated analysis for BDI agents
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1