In iPython, I import a module, which in turn imports another module. This another module (namely gurobipy) tries to load its shared library, which fails. The path to the shared library is added to LD_LIBRARY_PATH
in .bashrc. When I run the whole thing as a script from the shell, everything is fine.
I googled for a while now but didn't find the ultimate answer to the question: how do I set LD_LIBRARY_PATH
in iPython such that imported modules will see it?
I tried os.environ but still got the same error message: ImportError: libgurobi50.so: cannot open shared object file: No such file or directory
EDIT: I'm using Ubuntu 13.04.