在python脚本中使用easy_install? [英] Using easy_install inside a python script?
本文介绍了在python脚本中使用easy_install?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
easy_install python 扩展允许从控制台安装 python 鸡蛋,例如:
easy_install python extension allows to install python eggs from console like:
easy_install py2app
但是是否可以在 python 脚本中访问 easy_install 功能?我的意思是,不调用 os.system( "easy_install py2app" ) 而是将 easy_install 作为 python 模块导入并使用它的本地方法?
But is it possible to access easy_install functionality inside a python script? I means, without calling os.system( "easy_install py2app" ) but instead importing easy_install as a python module and using it's native methods?
推荐答案
当我查看设置工具源时,您似乎可以尝试以下操作.
When I look at the setup tools source, it looks like you can try the following.
from setuptools.command import easy_install
easy_install.main( ["-U","py2app"] )
这篇关于在python脚本中使用easy_install?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文