Diagnosis of package installation incompatibility via knowledge base

Yulu Cao,Zhifei Chen, Xiaowei Zhang,Yanhui Li,Lin Chen,Linzhang Wang

Science of Computer Programming(2024)

引用 0|浏览5
暂无评分
摘要
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.
更多
查看译文
关键词
Python,Dependency conflict,Compatibility
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要