Starting a python-ogre app from an IDE

SomeFusion

18-05-2008 15:47:08

Hi,

I'm having a problem using python-ogre in my own project outside of the p-o demos folder. He can find the python packages but he can't find the native libraries.

This is the error I get:

stefan@stefan-desktop:~/Lockenwickler/src$ python Lockenwickler.py
LD_LIBRARY_PATH = /home/stefan/development/root/usr/lib/ #this is a check to make sure LD_LIBRARY_PATH is correct
LD_LIBRARY_PATH = /home/stefan/development/root/usr/lib/ #this is a check to make sure LD_LIBRARY_PATH is correct
Traceback (most recent call last):
File "Lockenwickler.py", line 16, in <module>
from ModelSelectionDialog import *
File "ModelSelectionDialog.py", line 6, in <module>
import OgreWidget
File "OgreWidget.py", line 8, in <module>
import ogre.renderer.OGRE as og
File "/home/stefan/development/root/usr/lib/python2.5/site-packages/ogre/renderer/OGRE/__init__.py", line 10, in <module>
from _ogre_ import *
ImportError: libOgreMain-1.4.6.so: cannot open shared object file: No such file or directory


I configure my app like in the demos:

sys.path.insert(0,'..')
import PythonOgreConfig

print "LD_LIBRARY_PATH = " + os.environ['LD_LIBRARY_PATH'] #this is a check to make sure LD_LIBRARY_PATH is correct


I'm doing this at the start of my programm and as you can see the library path is correct. The strange thing is I have my path set also with "sudo ldconfig ~/development/root/usr/lib/" but it doesn't seem to work so I may do something stupid here, I'm just not sure what. My IDE is Eric4. Starting my app from command line while setting "export LD_LIBRARY_PATH=~/development/root/usr/lib/" beforehand works fine.


Thanks,
SomeFusion

nicolasbrown

13-06-2008 01:04:58

I cant bother looking for IDEs so I use IDLE.As simple as that.
And i dont get the errors that you do. :D