|Version 7 (modified by mitar, 2 years ago) (diff)|
Building From Source
To build orange from source you first have to make sure you have a C++ tool-chain installed
on your system. Supported compilers are gcc (g++) for Linux and Mac OS X and Microsoft Visual
C++ on Windows (MinGW is not supported at this time).
- On Windows install the free Visual Studio Express
- On Linux use the distribution package management tools
- On Mac OSX install the XCode developer tools
Additionally you will need python and numpy development header files. This comes included with python and numpy installation on Windows and Mac OSX, but is usually separated into separate packages on Linux, for instance 'python-dev' and python-numpy-dev' on Debian derived distributions.
Downloading the latest source snapshot
Go to nightly builds and download the latest nightly packed
sources zip archive and unpack it somewhere (for instance in your home directory).
Alternatively you can checkout the sources from the Mercurial repository.
hg clone https://bitbucket.org/biolab/orange
Build and Install
The easiest way to build the orange library from source is to use the standard setup.py script in the root orange directory. Just run
python setup.py build
to build and
python setup.py install
to install the library in the system site-packages. This may require administrative privileges. If you don't have them you can install Orange into the user specific site-packages. See http://docs.python.org/install/index.html#how-installation-works for more information on other installation schemes. Note that if you install orange in a non-system/user site-packages (for instance by using the the 'home' scheme) you will need to add the install dir to PYTHONSITEPACKAGES (that is because orange needs Python to process its .pth file to add the appropriate directories to the sys.path).
This is mostly only useful to developers intending to modify/develop orange C++ code (this can only build the extensions
in-place, i.e. it does not support an install command)
First change the working directory to the 'source' sub-directory then run make
cd source make
this will build the orange core extensions in the root directory (i.e. the one you started in). Useful environment variables:
- PYTHON - names the python executable for which Orange is being build.
- CXXFLAGS - flags to pass to C++ compiler
- CFLAGS - flags to pass to C compiler
- LDFLAGS - flags to pass to the linker
- EXCLUDE_ORANGEQT - if set to any value will cause orangeqt to not be build
(See source/orangeqt/README.txt for instructions on how to build orangeqt alone).
Linking to external libraries
The Orange sources come bundled with some third party libraries that are build and linked (statically) into Orange. These are:
- BLAS (a subset)
- LIBSVM (v3.2 - v3.* is required)
- LIBLINEAR (v1.8)
You can customize the build process to instead link to the corresponding external library if you already have them installed.
For the setup.py method this is done by modifying the setup-site.cfg file in the Orange root directory. See the comments in that file for instructions and examples on how to customize the process.
Pass the library names to make on the command line or through env. variables (you can also just edit the Makefile). Example:
All the variable names are listed in the source/Makefile.