Software developers rely on packages to reuse existing functionality instead of implementing everything from scratch. Python developers commonly provide package and interpreter dependencies using configuration files, such as requirements.txt or setup.py. Package managers in Python, such as pip, can install packages according to dependency and interpreter version constraints specified in configuration files. However, Python dependency resolution remains challenging: (1) different packages may require incompatible versions of the same dependency; (2) dependencies may require a Python interpreter version that is incompatible with the interpreter used for the project, making a valid environment impossible; and (3) pip, the most popular Python package manager, resolves conflicts via backtracking, repeatedly trying candidate versions without knowing whether a valid execution environment exists or not. To address these challenges, we present SMTpip, an interpreter-aware environment inference technique for improving the executability of Python source-code artifacts. SMTpip constructs a dependency knowledge graph using metadata stored in the Python Package Index (PyPI) that hosts millions of package releases, encodes both package version constraints and interpreter compatibility constraints specified in configuration files into Satisfiability Modulo Theories (SMT) formulas. Solving these formulas identifies a set of package versions and an interpreter version that jointly satisfy all declared constraints. Empirical evaluation on multiple datasets from open-source Python projects shows that SMTpip achieves substantial speedups -- $6.9\times$ over pip, $9.6\times$ over Conda, $3.2\times$ over smartPip, and $4\times$ over PyEGo -- while consistently producing constraint-consistent environments.


翻译:暂无翻译

0
下载
关闭预览

相关内容

【2022新书】Python DevOps,245页pdf
专知会员服务
91+阅读 · 2022年7月11日
专知会员服务
94+阅读 · 2020年12月26日
专知会员服务
53+阅读 · 2020年9月2日
Python计算导论,560页pdf,Introduction to Computing Using Python
专知会员服务
77+阅读 · 2020年5月5日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
164+阅读 · 2019年10月12日
【新书】Python编程基础,669页pdf
专知会员服务
199+阅读 · 2019年10月10日
吐血整理!140种Python标准库、第三方库和外部工具都有了
炼数成金订阅号
16+阅读 · 2019年7月30日
手把手教你用Python实现“坦克大战”,附详细代码!
机器学习算法与Python学习
12+阅读 · 2019年6月8日
Python机器学习课程(代码与教程)
专知
37+阅读 · 2019年5月13日
一个牛逼的 Python 调试工具
机器学习算法与Python学习
15+阅读 · 2019年4月30日
Python 神经网络编程
人工智能头条
10+阅读 · 2019年2月27日
使用Python进行图像增强
AI研习社
17+阅读 · 2018年9月30日
实战 | 用Python做图像处理(一)
七月在线实验室
25+阅读 · 2018年5月23日
这可能是学习Python最好的免费在线电子书
程序猿
56+阅读 · 2018年5月17日
干货 | Python 爬虫的工具列表大全
机器学习算法与Python学习
11+阅读 · 2018年4月13日
用Python制作3D动画
Python程序员
30+阅读 · 2018年1月17日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
VIP会员
相关主题
最新内容
《最强大的军事网状网络》
专知会员服务
5+阅读 · 9月7日
《预测陆军征兵任务分配》110页
专知会员服务
5+阅读 · 9月7日
分层反无人机系统发展新趋势
专知会员服务
11+阅读 · 9月3日
何为协作武器?
专知会员服务
11+阅读 · 9月1日
相关VIP内容
【2022新书】Python DevOps,245页pdf
专知会员服务
91+阅读 · 2022年7月11日
专知会员服务
94+阅读 · 2020年12月26日
专知会员服务
53+阅读 · 2020年9月2日
Python计算导论,560页pdf,Introduction to Computing Using Python
专知会员服务
77+阅读 · 2020年5月5日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
164+阅读 · 2019年10月12日
【新书】Python编程基础,669页pdf
专知会员服务
199+阅读 · 2019年10月10日
相关资讯
吐血整理!140种Python标准库、第三方库和外部工具都有了
炼数成金订阅号
16+阅读 · 2019年7月30日
手把手教你用Python实现“坦克大战”,附详细代码!
机器学习算法与Python学习
12+阅读 · 2019年6月8日
Python机器学习课程(代码与教程)
专知
37+阅读 · 2019年5月13日
一个牛逼的 Python 调试工具
机器学习算法与Python学习
15+阅读 · 2019年4月30日
Python 神经网络编程
人工智能头条
10+阅读 · 2019年2月27日
使用Python进行图像增强
AI研习社
17+阅读 · 2018年9月30日
实战 | 用Python做图像处理(一)
七月在线实验室
25+阅读 · 2018年5月23日
这可能是学习Python最好的免费在线电子书
程序猿
56+阅读 · 2018年5月17日
干货 | Python 爬虫的工具列表大全
机器学习算法与Python学习
11+阅读 · 2018年4月13日
用Python制作3D动画
Python程序员
30+阅读 · 2018年1月17日
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员