简体   繁体   中英

pygame module is not working in python 3.4.2

Pygame module is installed but not working.

ImportError: No module named 'pygame.locals'; 'pygame' is not a package

it worked when I import it in idle without creating a file but not working when .py file is executed through interpreter

Make sure that you're not using pygame.py as a script filename. It will prevent the import of pygame module you want.

Rename the file not to conflict. Also make sure there's no remaning pygame.pyc file.

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