Home > Backend Development > Python Tutorial > 用Python写好的程序如何在其他计算机上运行?

用Python写好的程序如何在其他计算机上运行?

WBOY
Release: 2016-06-06 16:23:52
Original
4815 people have browsed it

回复内容:

这属于一个“软件发布”的问题。

先讨论最简单常见的情况:
====================

  • Windows 平台
  • Python 2.7.9(Python 2最新版)

py2exe 是最好的选择。


1. 安装py2exe


可直接到这里下载

py2exe - Browse /py2exe/0.6.9 at SourceForge.net

应选择Python对应的版本。例如我们的Python是32位的2.7.9,则下载

py2exe-0.6.9.win32-py2.7.exe

如果你安装的Python是64位的,则下载

py2exe-0.6.9.win64-py2.7.amd64.exe


查看Python是32位还是64位,只需到命令提示符下运行:

<code class="language-bat">python -c <span class="s2">"import sys;print '%x' % sys.maxint"</span>
</code>
Copy after login
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template