运行 或在 Windows 上编译 Python 脚本

Running or compiling a Python script on Windows

我想在 Windows 7.

上修改这个 Python 脚本

https://github.com/Jeremy1980/LDBoxer

原作者好像把程序编译成了Windows可执行文件。是否可以 运行 脚本而不编译它?我在命令提示符下尝试了以下操作:

python LDBoxer.py

但是Windows说不识别'python'。我需要安装什么以及正确的命令行语法是什么?根据文档,这是 运行 可执行文件的正确方法:

LDBoxer_2017a.exe ldraw_library_location  ldraw_model_location_for_conversion

谢谢。

您需要确保已安装 python,然后确保 运行 正在使用正确的 python 编译命令。有时在安装 python 2 时,您需要 运行 命令 python2python27.

您可以安装 python here。看起来他们是用 python 2.x 写的,所以我建议安装 python 2.7 版,除非您想手动将其转换为 python 3.x。

您应该可以 运行 .exe 只需双击,或者右键单击然后 运行。