LinuxInstall
(→Installation problems) |
(→Installation problems) |
||
Line 92: | Line 92: | ||
== Installation problems == | == Installation problems == | ||
− | If you have two different Python versions installed on your computer it may appear a problem. To solve it the path to Python library should be specified by adding | + | If you have two different Python versions installed on your computer it may appear a problem. To solve it the path to Python library should be specified by adding |
− | + | to "configure.sh" configuration file for example | |
− | to "configure.sh" configuration file | + | |
-DPYTHON_LIBRARY="/usr/lib/python2.7/config/libpython2.7.so" \ | -DPYTHON_LIBRARY="/usr/lib/python2.7/config/libpython2.7.so" \ | ||
+ | -DPYTHON_INCLUDE_DIR="/usr/include/python2.7" |
Revision as of 11:51, 27 February 2013
Contents |
Install Kratos the easy way
If you are a lucky owner of a ubuntu-based linux machine, than you can directly install a .deb file. Such package ( Download ) automatically installs the Kratos together with all of the libraries necessary for its correct usage and leaves the system ready for being used.
Compile your own version of the Kratos
Developers, users of non-ubuntu machines and sudoers are expected to download and compile the source files.
This tutorial assumes that a reasonably modern distribution is being used. Older versions may require compiling some of the files "by hand"
All of the kratos installation is based on the use of "cmake" for which a modern version is needed.
Since "cmake" is continuosly being improved we advice the user to get and install the most modern version.
You can follow an installation guide here InstallCmake.
Once the cmake is installed, one should proceed to the installation of the prerequisites, that is, of the libraries that are not part of the Kratos but that are needed for its compilation.
The installation of such prerequisites is described at Install Kratos Prerequisites.
At this point we are finally ready to install the Kratos.
Let's assume that we are in the current user's home directory:
$HOME/
We shall first of all get a clean version by downloading from the repository
mkdir kratos cd kratos svn checkout https://svn.cimne.upc.edu/p/kratos/kratos "."
we can finally proceed to the compilation of the files. The idea is that each user can write a configuration file and activate or deactivate the applications to be included.
In order to simplify the compilation an example configuration file is provided in the directory "cmake_build".
The user is expected to make a copy of the example file and to change it according to his needs
cd cmake_build cp example_configure.sh.do_not_touch configure.sh
now it is possible to edit the configuration file to modify it as needed. Applications are activated by setting them to ON and deactivated by setting them to OFF.
while the current configuration is designed to work "out-of-the-box" on ubuntu, on other systems one may be required to tell the cmake the position of the libraries. The file README included in the cmake_build directory attempts to cover the common cases.
Once this is done we can proceed to the compilation by doing
sh configure.sh
which, if completed correctly, is expected to compile the kratos and install it in the directory where it was downloaded, that is
$HOME/kratos
In order to be able to use the Kratos we need now to tell to the system's python installation where to find the Kratos libraries. This can be done by setting the environment variable PYTHONPATH
by appending the Kratos installation directory to the existing path information by typing:
echo "export PYTHONPATH=\$HOME/kratos:\$PYTHONPATH" >> $HOME/.bashrc
The previous shell command adds one line at the end of the file '.bashrc', located in your home folder.
Prescribing a different installation path
The cmake provides the possibility of prescribing a different installation path for Kratos
this can be done for example by adding the line
-DKRATOS_INSTALL_PREFIX="/path/to/my/kratos/installation" \ -DINSTALL_PYTHON_FILES=ON \
to your "configure.sh", so to instruct to install the Kratos in the specified directory.
|
Of course, if this is done, the PYTHONPATH environment variable should be modified accordingly (for example as)
export PYTHONPATH=/path/to/my/kratos/installation/:$PYTHONPATH
Preparing a deb package
Kratos can be configured to generate deb packages. In order to do this, the installation directory has to be set to "/opt/kratos" by adding
-DKRATOS_INSTALL_PREFIX="/opt/kratos" \ -DINSTALL_PYTHON_FILES=ON \
to our "configure.sh" configuration file.
The debian package is then generated by:
make package
Installation problems
If you have two different Python versions installed on your computer it may appear a problem. To solve it the path to Python library should be specified by adding to "configure.sh" configuration file for example
-DPYTHON_LIBRARY="/usr/lib/python2.7/config/libpython2.7.so" \ -DPYTHON_INCLUDE_DIR="/usr/include/python2.7"