greg's local install workflow

Greg Horn edited this page Apr 8, 2015 · 2 revisions

I don't install casadi into /usr/local, I install it somewhere else so that uninstalls and multiple versions are easier. I configure casadi with this cmake command:

cmake -DWITH_PYTHON=ON -DPYTHON_PREFIX=/home/ghorn/casadi_install -DCMAKE_INSTALL_PREFIX=/home/ghorn/casadi_install ..

This tells casadi to build with python, and install the C++ and python into /home/ghorn/casadi_install. You should adjust this part to install where you want.

Then after casadi is installed, we have to tell the system how to find it. I add this to the end of my .bashrc:

export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/home/ghorn/casadi_install/lib/pkgconfig
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/ghorn/casadi_install/lib
export PYTHONPATH=$PYTHONPATH:/home/ghorn/casadi_install

If you are on OSX you might have to change LD_LIBRARY_PATH to DYLD_LIBRARY_PATH.

Also see for using HSL