trying the demos, Module use of python27.dll conflicts...


28-02-2011 18:27:11


I have all set up as told in the installation guide but I get this error when I try running any of the demos in demos/ogre. The error is on line 10 in the in C:\hp\bin\Python\lib\site-packages\ogre\renderer\OGRE and the line 10 is

from _ogre_ import *

I tried checking the _ogre_.pyd file but I am not sure where I should change the Python version ogre needs(do I need to). Installation guide said that 2.6 is good but error says that I'm missing python27.dll.

So, I installed 2.7 and when I ran the I got this error message: Module use of python27.dll conflicts with this version of python. Huh? I don't want to install only 2.7 because pygame doesn't support 2.7 and I use pygame quite a lot but then again if they are installed on top of each other I get some random errors like above from other modules. Should I just move on and install only 2.7 and would it fix the problem?

Yeah and when I installed python-ogre I had to rename one of the folders (it was packages-2.7) to 2.5 so that it could finish the

EDIT: I first installed the 1.7.2 version and looking at the filename it requires python 2.7 but I removed the files from my C:\python-ogre path and installed the 1.7.1 version instead. Are there other files I need to remove so that it can run on Python 2.6?

EDIT2: Installed only the 2.7 version of Python and still get the error: Module use of python27.dll conflicts with this version of python. Also, when I open any of the Demos in IDLE and hit F5 I get this: ImportError: No module named ogre.renderer.OGRE


02-03-2011 04:34:59

It looks like there is still another version of python being picked up, maybe in your Environment Variables Path (?) ... bd38b89846

You could try updating your Environment path so that Python27 is picked up first or running a demo from the the dos/command prompt(??):
SET PATH=c:\Python27;%PATH%

It's been some time since I've python on Windows so you will probably need to amend the above accordingly.


02-03-2011 14:00:00

Thanks for the reply, fixing the PATH at least made the missing dll/module use... error disappear but now I get this error message:

No module named ogre.renderer.OGRE

So do I need to add something else to the PATH or did I miss something when I installed python-ogre?


02-03-2011 15:03:37

Check where you have actually installed python-ogre. My guess would be that you have installed the current version which is for python2.7 in your python2.6 directory.

Check to see if python-ogre is installed in either of these directories:
C:\Python27\Lib\site-packages\ogre and C:\Python26\Lib\site-packages\ogre

If you don't want to change your Environment Variables Path to pick up python2.7, then I think to install python-ogre(python2.7) you will have to:

From dos/command prompt and where you have unzipped python-ogre to:
> echo %PATH% (see whats actually in your path)
> SET PATH=c:\Python27;%PATH%
> python -V (check it's 2.7)
> python setup install

and to run a demo as before:
> SET PATH=c:\Python27;%PATH%
> python

It could there is some other issue but first check everything is installed correctly.


02-03-2011 17:49:53

Alrighty, I noticed that neither Python26 nor Python27 had the ogre installed in them, it seems it was only in the hp/ etc. directory.

So, I got it installed in Python27 but when I go to the directory with the demos and run any of the demo it looks like it loads up some resource groups and whatnot, but when it goes to *-*-*OGRE initialising it throws an
"OgreInternalErrorException: OGRE EXCEPTION(7:InternalErrorException): ../media/packs/ - error whilst opening an archive: Unable to read zip file."
And then there's OGRE Shutdown and it unregisteres and unloads the plugins and other bunch of stuff. I checked the PATH that C:\Python27 is there. Both the cameratracking and the basic demo do that(probably not with exactly same output), so what should I do now? I attached a screenshot of cmd with the part of OGRE initialising and shutdown for both the CameraTracking and Basic_Demo(basic being the upper and camera being the lower window)
PS: Thanks for your help so far :)


02-03-2011 18:19:28

You need the media files to run the demos. I know the link refers to 1.7.1 but I don't think there is one for 1.7.2, anyway the media shouldn't have changed and you should be able to run all the demos: ... z/download

You should unzip the media dir into your demos dir, so you will have something like:

c:\python-ogre (or wherever you are running the demos from).

Then you should be good to go.


02-03-2011 19:27:57

Thanks for all the help, it works now. :) Kudos+ for you!


02-03-2011 22:03:28

Also if you are running multiple versions of python on Windows you should read the following thread: ... puter.aspx

You can create a couple of command files that are picked up somewhere in your path:


c:\Python27\python.exe %*


c:\Python26\python.exe %*

Then just run python26/ python27 <>