繁体   English   中英

将 .py 文件转换为 .exe 时无法识别术语“auto-py-to-exe”

[英]The term 'auto-py-to-exe' is not recognized error while converting the .py file to .exe

完成我的 python 项目后,我尝试将其转换为 .exe 文件,因此我使用 python 版本 3.10。 我已经从 cmd 安装了 auto-py-to-exe 应用程序,但是当我想打开它时,出现此错误:

auto-py-to-exe : The term 'auto-py-to-exe' is not recognized as the name of 
a cmdlet, function, script file, or operable program. Check the spelling of 
the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1
+ auto-py-to-exe
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (auto-py-to-exe:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

检查您是否将 Python 和 Python 脚本添加到您的 PATH。

  1. 搜索“编辑系统环境变量”(Windows 搜索)并单击第一个结果
  2. 在打开的window中点击“环境变量...”
  3. 在“系统变量”部分双击“路径”变量
  4. 在打开的 window 中单击“新建”按钮并在其中键入C:\Python310\ 创建另一个条目并在其中键入C:\Python310\Scripts\
  5. 点击“确定”

现在打开命令提示符(确保不要打开终端)并输入auto-py-to-exeautopytoexe ,两者都应该工作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM