如何在不安装的情况下启动Python应用程序? [英] How to launch Python application without installation?

查看:123
本文介绍了如何在不安装的情况下启动Python应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有python脚本.它们必须在没有python的计算机上运行,​​因此我使用py2exe将py脚本编译为可执行文件.应该安装带有py2exe的Python来执行编译.但是我希望能够在没有安装python的任何机器上进行编译.

I have python scripts. They have to run on the machines without python, so I compile py scripts to executables using py2exe. Python with py2exe should be installed to perform compilation. But I want to be able to compile it on any machine without python installation.

那么,有没有办法在Windows上无需安装即可运行python应用程序?

So, is there any way to run python application on Windows without installation?

UPD.我知道由py2exe二进制文件编译的程序将在没有python的情况下运行.我问如何在不使用python的情况下启动py2exe?

好吧,答案很明确-没有办法.我们回到第一个问题:

Ok, the answer is clear - there is no way. And we came back to first question:

UPD2.如何在没有安装的情况下运行python(以在其上启动py2exe)?

推荐答案

阅读常见问题解答:

py2exe不能独立执行(不幸的是),因此您首先像往常一样安装Python软件包,然后在setup.py脚本.然后只需使用相应的命令运行distutils.

py2exe can not be executed standalone (unfortunately), so you first install it as usual Python package, then create a section in your setup.py script. then just run distutils with corresponding commands.

http://www.py2exe.org/index.cgi/FAQ

,但是您无需安装即可运行python: http://www.portablepython.com/

but you can run python without installing it: http://www.portablepython.com/

这篇关于如何在不安装的情况下启动Python应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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