Is that the whole script? No mainloop, nothing? That won't do anything of course.
About the PyDev problems, they are problems to ask about on a PyDev forum, not here. Most people here are probably not PyDev users and don't care about this platform.
I happen to use it, so I think I know what may be wrong there. Seems you either didn't install the libraries, or didn't setup the correct interpreter on PyDev, or if you did the PyDev interpreter PYTHONPATH does not include the correct folders. If you want to use local imports, pyglet and cocos don't have to be installed, but you need to setup your project's PyDev PYTHONPATH to include the source folders with those modules.
Good luck,
Thomas