简体   繁体   English

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

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

After I finish my python project, I tried to convert it to.exe file, so I use python version 3.10.完成我的 python 项目后,我尝试将其转换为 .exe 文件,因此我使用 python 版本 3.10。 I already installed the auto-py-to-exe app from the cmd but when I want to open it I get this error:我已经从 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

Check if you added Python and Python Scripts to your PATH.检查您是否将 Python 和 Python 脚本添加到您的 PATH。

  1. Search for "Edit the system environment variables" (Windows Search) and click the first result搜索“编辑系统环境变量”(Windows 搜索)并单击第一个结果
  2. Click "Environment Variables..." in the window that opened在打开的window中点击“环境变量...”
  3. In the "System variables" section double click the "Path" variable在“系统变量”部分双击“路径”变量
  4. In the window that opened click the "New" button and type C:\Python310\ there.在打开的 window 中单击“新建”按钮并在其中键入C:\Python310\ Create another entry and type C:\Python310\Scripts\ there.创建另一个条目并在其中键入C:\Python310\Scripts\
  5. Click "OK"点击“确定”

Now open the command prompt (make sure to not open the terminal) and type in auto-py-to-exe or autopytoexe , both should work.现在打开命令提示符(确保不要打开终端)并输入auto-py-to-exeautopytoexe ,两者都应该工作。

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

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