Python-Ogre SDK for Dummies (Windows/Linux)

Mohican

18-05-2011 08:15:45

I have seen comments here and there showing that some people struggle to get going with the current Python-Ogre SDK.
Compared to Panda3D, the installation procedure involves a bit of arcane knowledge that alas not everyone possess.

So I have started maintaining a new SDK 'for dummies' on our openRTSS project page:
https://sourceforge.net/projects/openrt ... -Ogre-SDK/

There are currently 2 platforms available:
- The Windows SDK contains: Ogre, OIS, OgrePaging, OgrePCZ, OgreRTShaders, OgreTerrain, OgreForest, OgreOggSound, Bullet, Caelum, CEGUI, Hikari, QuickGui, Raknet, SkyX.
- The Ubuntu SDK contains: Ogre, OIS, OgrePaging, OgreTerrain, CEGUI, Raknet.

Installation Instructions:
- Download and unzip the Demos
- Download and unzip platform pack into the sub-folder /[SDK]
- Run demo_bezier(.bat or .sh).

Future Plans:
- Tidy up the demos, they are in a proper mess!
- Include as many modules as possible (including Hydrax, ODE, Newton...).
- Integrate pyQt4 in the SDK, together with sample demos.
- Add more platforms (MacOSX, Debian, ...).

I will keep this post updated with the latest information.
The package files are dated, so you will know when new stuff has been added.

pirateangel

19-05-2011 22:53:22

great initiative, will help many people. thanks.

iwanantonowitsch

20-05-2011 18:10:53

is ogreode missing?
i agree to what pirateangel said

drakide

29-05-2011 14:22:03

Hello everyone and thanks for the SDK Mohican. I've followed your steps, but when starting "demo_bezier.sh" everything I get is:
Traceback (most recent call last):
File "ogre/Demo_Bezier.py", line 24, in <module>
import ogre.renderer.OGRE as ogre
File "/usr/local/lib/python2.7/dist-packages/ogre/renderer/OGRE/__init__.py", line 10, in <module>
from _ogre_ import *
ImportError: No module named _ogre_


I am currently working on ubuntu 11.04 64Bit, looking forward to your fedora release!

Mohican

29-05-2011 17:49:23

Hello everyone and thanks for the SDK Mohican. I've followed your steps, but when starting "demo_bezier.sh" everything I get is:
Traceback (most recent call last):
File "ogre/Demo_Bezier.py", line 24, in <module>
import ogre.renderer.OGRE as ogre
File "/usr/local/lib/python2.7/dist-packages/ogre/renderer/OGRE/__init__.py", line 10, in <module>
from _ogre_ import *
ImportError: No module named _ogre_


I am currently working on ubuntu 11.04 64Bit, looking forward to your fedora release!



Somehow you are picking up the wrong python-ogre.
Instead of using the one that is included in [SDK], your system is using the one in usr/local/

Did you unzip the ubuntu SDK files into the subfolder [SDK] of the unzipped demos pack?

drakide

30-05-2011 17:48:26

Thanks for your reply!

- Download and unzip platform pack into the sub-folder /[SDK]

Actually I did the following:
Because I wasn't completly sure if I need to extract the "Python-Ogre_1.7.2_Ubuntu_11.04_(2011-05-18)" or just its contents "bin, include, lib" I unzipped both. I guess I need to extract only the contents, because the "Ubuntu" would screw the path up. Anyway I tried all three situations (only contents, whole folder, both), the problem remains.

One last note: It isn't that tragical if python-OGRE does not work. I am thinking about using native OGRE even though I love python and hate C++. Recent events have made me unsure if native OGRE wouldn't be a better solution since I am not sure how to handle other plugins with python OGRE and my game will be very CPU heavy. Also see my thread at
http://www.ogre3d.org/addonforums/viewtopic.php?f=3&t=14415

Thank your for your help anyway, some help at the previous mentioned thread would be appreciated since you are already familiar with python OGRE.

Mohican

31-05-2011 16:46:52

I am not sure what you are trying to do....

On my PC, I have a folder called /home/mohican/python-ogre/.
I unzipped the demos directly into that folder.

Then I unzipped the ubuntu pack into the subfolder /home/mohican/python-ogre/[SDK]/

So I end up with:

/home/mohican/python-ogre/[SDK]/bin/
/home/mohican/python-ogre/[SDK]/include/
/home/mohican/python-ogre/[SDK]/lib/
/home/mohican/python-ogre/cegui/
/home/mohican/python-ogre/media/
/home/mohican/python-ogre/ogre/
/home/mohican/python-ogre/raknet/
/home/mohican/python-ogre/demo_bezier.sh
/home/mohican/python-ogre/....

drakide

01-06-2011 14:57:34

/home/mohican/python-ogre/[SDK]/
Except of the "mohicon" I've got the same folder hierarchy here. (by the way: am I allowed to have more folders between the "mohicon" and the "python-ogre"? for example "/home/mohican/test/python-ogre/[SDK]/")

notes:
-I am using 64 Bit ubuntu, but since python is causing the problem and python works well with 64 Bit this shouldn't be problematic
-I've tried the SDK on another laptop running fedora 15 (64 Bit), the problem remains (I know the SDK is made for ubuntu, but I wanted to give it a try)
-python is installed and working
-do I need to install something else before?
-OGRE tells me that it fails to import the file named "_ogre_". Actually there really isn't a file named "_ogre_.py" or "_ogre_.pyc", only a "_ogre_.pyd" file exists. My attempt to open this file caused gedit to freeze and archive manager told me that it is unable to read the archive. I don't know if this is normal, I've never used knowingly a pyd file before.
-going to test this on a fresh ubuntu installation on a virtual machine. I'll keep you updated.


Cannot answer until June 7th. School trip to berlin.

Mohican

04-06-2011 16:35:09

I compiled this SDK on a 32 bit Ubuntu VM.
Maybe that's the real cause of the problem...

Let me know how you get on with the VM.

P.S: PYD files are C code compiled as Python Modules.

dermont

04-06-2011 19:21:50

/home/mohican/python-ogre/[SDK]/
Except of the "mohicon" I've got the same folder hierarchy here. (by the way: am I allowed to have more folders between the "mohicon" and the "python-ogre"? for example "/home/mohican/test/python-ogre/[SDK]/")

notes:
-I am using 64 Bit ubuntu, but since python is causing the problem and python works well with 64 Bit this shouldn't be problematic
-I've tried the SDK on another laptop running fedora 15 (64 Bit), the problem remains (I know the SDK is made for ubuntu, but I wanted to give it a try)
-python is installed and working
-do I need to install something else before?
-OGRE tells me that it fails to import there is no file named "_ogre_". Actually there really isn't a file named "_ogre_.py" or "_ogre_.pyc", only a "_ogre_.pyd" file exists. My attempt to open this file caused gedit to freeze and archive manager told me that it is unable to read the archive. I don't know if this is normal, I've never used knowingly a pyd file before.
-going to test this on a fresh ubuntu installation on a virtual machine. I'll keep you updated.


Cannot answer until June 7th. School trip to berlin.

Why are you trying to import a .pyd file on linux?

Mohican

04-06-2011 20:22:50

Why are you trying to import a .pyd file on linux?

Of course, how did I miss that!
Are you using the correct SDK???
The file should be _ogre_.so, not _ogre_.pyd

drakide

12-06-2011 08:28:03

Hello again, I am sorry to answer this late...

Are you using the correct SDK???
I am using the one named "Python-Ogre_1.7.2_Ubuntu_11.04_(2011-05-18).tar.bz2". But "/usr/local/lib/python2.7/dist-packages/ogre/renderer/OGRE/__init__.py" is not part of the SDK. The SDK is located at "/home/drakide/Projects/Python-Ogre/dummie/try/[SDK]"

Still working on virtual machine, much work to do here sorry...
EDIT: Virtual Machine causes more trouble than it would help D:
But since I am doing nothing but desperately trying to install python OGRE on my laptop I wouldn't have a problem with reinstalling any OS that might help. Would a fresh ubuntu installation on my laptop be helpful?

zzart

13-12-2011 11:44:55

Hi,
I've unpacked everyting(correct tree structure :) on ubuntu 10.04 .
./demo_bezier.sh
Traceback (most recent call last):
File "ogre/Demo_Bezier.py", line 24, in <module>
import ogre.renderer.OGRE as ogre
File "/home/mars/ogre3d/demo/[SDK]/lib/python2.7/site-packages/ogre/renderer/OGRE/__init__.py", line 10, in <module>
from _ogre_ import *
ImportError: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /home/mars/ogre3d/demo/[SDK]/lib/python2.7/site-packages/ogre/renderer/OGRE/_ogre_.so)

any hints ?

zzart

13-12-2011 23:31:25

ok i just followed this http://synergy-foss.org/osqa/questions/969/can-anyone-explain-what-to-do-about-glibcxx_3414-not-found-when-starting-synergy and that fix issue with outdated libs
then was getting this msg :

Loading library [SDK]/lib/OGRE/RenderSystem_Direct3D9.so
OGRE EXCEPTION(7:InternalErrorException): Could not load dynamic library [SDK]/lib/OGRE/RenderSystem_Direct3D9.so. System Error: [SDK]/lib/OGRE/RenderSystem_Direct3D9.so: cannot open shared object file: No such file or directory in DynLib::load at /home/mohican/pyogre/ogre/OgreMain/src/OgreDynLib.cpp (line 91)

so uncommented line Plugin=RenderSystem_Direct3D9.dll in plugins.cfg.nt and plugins.cfg.posix
now it is working.

dermont

15-12-2011 14:36:00

Hi,
I've unpacked everyting(correct tree structure :) on ubuntu 10.04 .
./demo_bezier.sh
Traceback (most recent call last):
File "ogre/Demo_Bezier.py", line 24, in <module>
import ogre.renderer.OGRE as ogre
File "/home/mars/ogre3d/demo/[SDK]/lib/python2.7/site-packages/ogre/renderer/OGRE/__init__.py", line 10, in <module>
from _ogre_ import *
ImportError: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /home/mars/ogre3d/demo/[SDK]/lib/python2.7/site-packages/ogre/renderer/OGRE/_ogre_.so)

any hints ?


Sorry don't have the SDK or know the answer to your problem but it looks like there is a compatibility issue between the version of libstdc++/gcc you have installed and that used to build the SDK. Do a google search on `GLIBCXX_3.4.14' and you will see it is a common problem.

You could wait for confirmation on which versions of the above are required but as you can probably see from the forum there is no telling how long you will wait for a reply.

You will probably be better off building python-ogre yourself.

zzart

15-12-2011 18:30:23

@dermont
thanks dermont for ur answer. u were right and i had old libstdc++.so packages. I've already sorted this and everything is running ok now. i've written post about it already but since it contained a link it was to be approved first. 3 days later it's still not showing up. :!:

dermont

15-12-2011 18:40:42

@dermont
thanks dermont for ur answer. u were right and i had old libstdc++.so packages. I've already sorted this and everything is running ok now. i've written post about it already but since it contained a link it was to be approved first. 3 days later it's still not showing up. :!:


Glad you got this sorted. Yeah the approval for new user posts with links is probably to circumvent spam, but three days and still not approved, not so good.

blz

24-01-2012 13:31:43

I've installed the Windows version of the SDK (v1.7). I also have python 2.7 installed.

Any 3rd party modules I install to my OS (via a windows installer that detects my python 2.7 installation) fail to import in the SDK's interpreter. Can somebody point me in the right direction? Are the two interpreters (the SDK's and the one installed to C:\python27) independent or something?

Best,
Blz