Abstract
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.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.