简体   繁体   中英

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. I already installed the auto-py-to-exe app from the cmd but when I want to open it I get this error:

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.

  1. Search for "Edit the system environment variables" (Windows Search) and click the first result
  2. Click "Environment Variables..." in the window that opened
  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. Create another entry and type C:\Python310\Scripts\ there.
  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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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