为Python创建Windows安装程序以及一组依赖项 [英] Creating a Windows installer for Python + a set of dependencies

查看:94
本文介绍了为Python创建Windows安装程序以及一组依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为Windows创建一个安装程序,该安装程序应该能够安装特定版本的Python解释器(2.7)以及一组依赖项,例如ipython,numpy,pandas等。



基本上,这是Active State在其Active Python发行版中所做的相同的事情:一个包含解释器和dep的捆绑包。除了不确定 NSIS 之外,我不确定从哪里开始(这有什么帮助吗?)

解决方案

我建议使用打包工具(该工具也用于构建Python版本),该工具位于工具/msi/msi.py 。在Python源(或安装)之上解压缩其他依赖项,然后调整msi.py以选择要打包的所有其他文件。您应该调整显示字符串以指示这确实是一个单独的Python发行版。


I need to create an installer for Windows which should be able to install a specific version of the Python interpreter (2.7) plus a set a dependencies such as ipython, numpy, pandas, etc.

Basically this is the same thing Active State did for their Active Python distribution: a single bundle including interpreter + deps.

Not being a Windows user I'm not sure where to start with this except maybe looking into NSIS (could that be of any help?).

解决方案

I suggest to use the packaging tool that I also use to build the Python releases, which is in Tools/msi/msi.py. Unpack the additional dependencies on top of the Python source (or an installation), then adjust msi.py to pick up all additional files that you want to package. You should adjust display strings to indicate that this is really a separate Python distribution.

这篇关于为Python创建Windows安装程序以及一组依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆