尝试使用py2exe,但无法识别python
我正在关注 http://www.py2exe.org/index.cgi/Tutorial 上的教程 了解如何使用 py2exe。我进入第 3 步,您应该运行命令:
python setup.py py2exe
我这样做了,然后收到此错误:
'python' is not recognized as an internal or external command,
operable program or batch file.
我的计算机上安装了 python 2.4。有什么想法吗?我确信这很简单。
I am following the the tutorial at http://www.py2exe.org/index.cgi/Tutorial to figure out how to use py2exe. I get down to step 3 where you are supposed to run the command:
python setup.py py2exe
I do that and then I get this error:
'python' is not recognized as an internal or external command,
operable program or batch file.
I have python 2.4 installed on my machine. any idea's? I am sure it is something simple.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Python 只是不在你的道路上。如果您确实有 Python 2.4,则默认安装程序应为
C:\Python24\python.exe
。无论文件位于何处,如果您没有在路径中设置 Python 的文件夹,您将把命令编写为
(或任何正确的路径)。
根据您的安装配置方式,您也许可以这样做,
因为 Windows 可能会自动将 *.py 文件与 Python 关联起来。
您可能还想阅读“查找 Python 可执行文件” 来自 Python 文档。
Python just isn't on your path. If you indeed have Python 2.4, it should be
C:\Python24\python.exe
with the default installer.Wherever the file is located, if you don't set Python's folder in your path, you will write the command as
(or whatever the correct path is).
Depending on how your installation was configured, you might be able to just do
since Windows might automatically associate *.py files with Python.
You might want to also read "Finding the Python Executable" from the Python documentation.
您需要将 python 添加到系统路径。在不同的操作系统上,此操作的执行方式有所不同。 适用于大多数 Windows 版本的说明
您需要添加 C:\Python24 或计算机上 python 所在的任何位置。
You need to add python to your system path. This is done differently on different OSs. Instructions for most versions of Windows
You need to add C:\Python24 or whereever python is on your computer.