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!
How to set up Sublime Text 2 with PyGame
Re: How to set up Sublime Text 2 with PyGame
If you have any problems during this, notify me and I'll try to explain further
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: How to set up Sublime Text 2 with PyGame
Very nice!
I have to say, though, that I think I am one of those people who doesn't get Sublime Text 2. I could never let go of my IDE features for enhanced text editor features
Very nice write-up, though, and I may just have to give it another chance sometime.
I have to say, though, that I think I am one of those people who doesn't get Sublime Text 2. I could never let go of my IDE features for enhanced text editor features
Very nice write-up, though, and I may just have to give it another chance sometime.
The indelible lord of tl;dr