在不安装所需模块的情况下运行Python程序 [英] Run Python program without installing required modules

查看:114
本文介绍了在不安装所需模块的情况下运行Python程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种方法可以将我的Python程序移至其他计算机,而无需重新安装所有必需的模块?

Is there a way to move a my Python program to other computer without the need of re installing all the required module?

也许通过编译?

推荐答案

我认为您正在寻找 PyInstaller .根据定义,PyInstaller是一个程序,可以在Windows,Linux,Mac OS X,Solaris和AIX下将Python程序转换(打包)为独立的可执行文件.

I think you're looking for PyInstaller. By definition, PyInstaller is a program that converts (packages) Python programs into stand-alone executables, under Windows, Linux, Mac OS X, Solaris and AIX.

PyInstaller目前不支持Python3.但是,有有关冻结代码或运送的页面:

PyInstaller as of this writing, doesn't support Python 3. There is however this page on freezing your code or shipping:

Solution    | Windows | Linux | OS X | Python 3 | License | One-file mode | Zipfile import | Eggs | pkg_resources support
bbFreeze    | yes     | yes   |  yes | no       | MIT     | no            | yes            | yes  | yes
py2exe      | yes     | no    | no   | no       | MIT     | yes           | yes            | no   | no
pyInstaller | yes     | yes   | yes  | no       | GPL     | yes           | no             | yes  | no
cx_Freeze   | yes     | yes   | yes  | yes      | PSF     | no            | yes            | yes  | no

请参见此处.

这篇关于在不安装所需模块的情况下运行Python程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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