简体   繁体   中英

pyinstaller — script not found.

I'm trying to learn how to use pyinstaller to make an executable. I wrote a little script in 2.7 as a test. Print 'test" and named it test-print. When I click on the executable in the Build folder a cmd screen flashes, and that all she wrote. I tried adding ax = raw_input('input something: ') hoping that would cause the cmd screen, or some kind of screen to persist, but to no avail. I know this is basic stuff, but a voice of experience would be most helpful. F

First try running the command from a command line (terminal) so you can see what happens. Not from inside any IDE.

If you created the script in a MSWindows environment, be sure your PATH includes the executable (or explicitly give the path to the script).

In Linux/Unix, be sure to enable execute permission for the script. chmod +x scriptname

In pyinstaller the actual executable is located in the dist folder. I assume you did not use pyinstallers "--onefile" switch so once you finish compiling, navigate to dist then test-print. Afterwards look for test-print.exe in that folder. That is your executable.

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