简体   繁体   中英

How to get Pygame script to run on macOS

I have a rather small Pygame based python script and I just bought a Mac so I'm trying to run my script on here. Everything has been installed correctly (Checking by typing 'import Pygame') into python terminal as-well as running a basic hello world program. However, when I try running this script, IDLE gets brought to the front but nothing happens from there. (The script is supposed to pop-up a new window). Is this a problem with my installations or my code? (Code works on windows setup).

You could try to run the script again on a windows computer to see if you forgot to save some changes or if the file got corrupted somehow. You could also use bootcamp to install Windows on your mac since you could have one windows version on your mac for coding purposes and the regular mac OS for other stuff if you like.

您可以通过左键单击脚本并选择使用 python 启动器打开来执行它

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