简体   繁体   中英

No Module name pygame.base

I wrote my program to spawn a process of the main application. When I run the pyinstaller packaged exe it says no Module name pygame.base . But if I keep the app in the main thread it doesn't do that.

I need the process to detect closure, because GLUT doesn't have an event for the upper right hand exit button and I can't remove it unless I use full-screen. The program's threads hang and the app never closes. So the main thread checks to see if the process is running. If not, it closes the entire application. But all closure will hang if I only use the main thread.

I can soft exit from in-game events just fine. But I need a way to catch the X button. OR fix pyinstaller.

I've looked up a bunch of things getting pyinstaller to include everything. I used the OneDir option so I can see the files. I copied all dependencies from one that worked to the one that didn't without replacing the exe. It still had the import error.

Any insight would be nice. For now the X button is a hazard. I'm guessing multiprocessing doesn't work with pyinstaller all too well.

在Windows上,当event.type == pygame.QUIT时,[x]按钮为我触发。

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