简体   繁体   中英

No module named 'pygame.base'

I've been having a lot of trouble converting one of my python projects into an executable with the use of pyinstaller. Upon launching the.exe, it gives this rather simple error that I just can't get my head around. The script works as intended in the editor (pycharm in this case).

In pyinstaller there is a single warning message displayed, "Hidden import "pygame._view" not found!"

I've tried using 32 and 64 bit versions of pygame, reinstalled several times and purged pip cache history.

I'm aware images aren't liked around here, but the.exe only remains open for one frame, I simply don't have enough time to copy the actual text. Full error message

If the code works fine in pycharm, then it might just be an issue with importing the module in the script. At least that's what the error emssage seems to be saying. Do you specifically import pygame.base or the like in the __init__.py script?

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