A little help for the newbie


15-01-2010 10:35:21

Alright, as this is my first post in this forum, I'd like to officially say hello to everyone :)

Now that that's out of the way, I'd appreciate if anyone could lead me in the right direction on this problem I'm having with building Python-Ogre from source. This is my first time building a program like this from source, so sorry if I sound ignorant.

I'm running Windows XP and using Python 2.6.2

Ok, so I've been going through the WindowsBuildV2 - PyWiki tutorial (http://wiki.python-ogre.org/index.php/WindowsBuildV2) and finally after about 4 clean tries, everything seems to be going perfect, except for the fact that the tutorial seems to die off once it starts talking about Scons... So, I improvised and tried to figure it out. First, I downloaded Scons and configured the PythonOgreConfig_nt.py file to what it should be. Then, I had no idea what to do next, so I ran the setup.py. I then tried to run some demos, none of which worked, because the ogre module was no where to be found apparently. Sooooo, I looked back at the tutorial and started trying to make some sense out of the section on BuildModule.py. I tried running "python python-ogre\BuildModule.py -r ogre" which, sadly, only gave me a couple task-failed errors. I ran the other commands located there also, with the same results. Once again discouraged, I decided to try using "scons BuildModule.py," being the newbie I am, I got pretty excited when it started spitting out that it was building all the modules, unfortunately I still couldn't run any of the demos as I still get "ImportError: No module named _ogre_"... so, at this point I'm stuck not knowing what to do and any push toward the right way would be very much appreciated! :mrgreen:


04-02-2010 18:07:57

Bump. Having the same problem (running on Vista though), any ideas for a solution?


04-02-2010 19:50:40

I'm probably not the best person to answer your question since I've never used the build system on Windows, but it looks as if no one else is going to reply:

a. Use the trunk repository for python, DO NOT use the 1.6 branch.
b. Your problem with "python-ogre\BuildModule.py -r ogre" is I think due to the fact the build system uses some GnuWin32 tools.

c. Some of the packages on the WindowsBuildV2 wiki appear to be outdated, the build system should automatically download the correct packages (BuildModule.py -r packagename) if you have installed the GnuWin32 tools.

If you run into problems take a look at environment.py for inspiration, e.g
(1) would be equivalent of BuildModule.py -r ogre
(2) would be equivalent of BuildModule.py -b ogre

class ogre(pymodule):
ModuleName = 'OGRE'

moduleParentLocation = "renderer"
parent = "ogre/renderer"
dependsOn = ['boost']
myLibraryPaths = []
myLibraries = ['OgreMain']
libraries = myLibraries
if isWindows():
version = "1.6.4"
(1) source = [
[ wget, "http://downloads.sourceforge.net/ogre/ogre-v1-6-4.zip", downloadPath],
[ wget, "http://downloads.sourceforge.net/ogre/OgreDependencies_VC9_Eihort_20080203.zip", downloadPath],

(2) buildCmds = [
[0, unzip + os.path.join(downloadPath, "ogre-v1-6-4.zip"), os.getcwd() ],
[0, unzip + os.path.join(downloadPath, "OgreDependencies_VC9_Eihort_20080203.zip"), Config.PATH_Ogre ],
[0, 'echo Please use MSVC Express Edition to build Ogre Release.', '']