FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


How to set up Sublime Text 2 with PyGame





Miroidan
I have seen several people on the internet that have a common problem; they don't know how to setup Pygame properly with Sublime Text 2.
Well, I've had the same problem, looked everywhere for hours and then I just fiddled with the Python/PyGame folder and managed to fix it. And it's working!

This is what you need:
http://www.sublimetext.com/2 - Choose Sublime Text 2.0.2. There is currently no enforced time limit for the evaluation.

I chose Python 2.7.6.
https://www.python.org/download/releases/2.7.6/

PyGame 2.7. I chose pygame-1.9.1.win32-py2.7.msi ( 3.1MB )
http://www.pygame.org/download.shtml

Now into the good stuff, it's actually quite simple and not that hard as some may think it is. Read these instructions carefully! (I'm using WINDOWS VISTA)
1. Open your Python27 folder and your PyGame folder.

2. In your PyGame folder; Open Include folder and copy the pygame folder that contain .h files.

3. Now go to your Python27 folder and click on the include folder and paste your pygame folder in it.

4. Now onto the Lib folder. Open up the PyGame folder you downloaded and go to Lib/site-packages. Copy both pygame folder and the EGG-INFO-FILE(pygame.19.1...)
5. Go back to your Python27 folder and click on Lib/site-packages and paste it over there.

Now open Sublime Text 2, press Tools > Build System and check Python.
You might need to change your syntax before saving your files, the shortcut is CTRL + SHIFT + P, search for 'Python'. And choose the 'Set Syntax: Python'.
To build your file, do CTRL + B or press Tools > Build.

You have now a fully working Sublime Text Editor with Python27 using PyGame. Congratulations and happy coding!
Related topics
751 Useful Windows XP Files
What do you think about text books being free?
Gimp - Sig making:N00b to pro!(finally finished)
Server status script
Tables and Layout
xp 3d desktop tools
Image Height
Radio and text not going 100%?
Best :: HTML Editor ::
New Folder.exe
Graphic Design and Web Design Website
Google Chrom
Editors for Python
CSS-editor
Sublime Text 2
Reply to topic    Frihost Forum Index -> Miscellaneous -> Tutorials

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.