How to set up pygame with Eclipse?

后端 未结 3 2073
旧时难觅i
旧时难觅i 2021-01-06 14:11

Edit3: Additional information: I was able to get the Eclipse/pygame combo running on Windows... just not on MacOSX.


Edit2: Compiling from the shell also works.

3条回答
  •  温柔的废话
    2021-01-06 15:08

    After reading your three edits, it seems like there is an architectural problem. Since PyGame doesn't work on a 64-bit platform, you need to chose the 32-bit python interpreter in this case.

    Go to Eclipse->Preferences->PyDev->Interpreters->Python Interpreter and add a new 32-bit python interpreter. The path for 32-bit python interpreter would most probably be the same as your usual python interpreter except that the file is called "python2.7-32" instead of "python2.7" (if the python version is 2.7). So, for me it is: "/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-32".

    Once setup, you can either make it a default interpreter or chose it from Project->Properties->PyDev - Interpreter/Grammar when using PyGame.

提交回复
热议问题