|igraph Reference Manual|
$ wget http://cneurocvs.rmki.kfki.hu/igraph/download/igraph-0.2.tar.gz $ tar xzf igraph-0.2.tar.gz $ cd igraph-0.2
To install the complete C library typing
$ ./configure $ make $ make install
(the latter as root) should work on most systems. You can try
$ ./configure --help
to see installations options, and reading the
Installing the igraph R package is very simple, you don't need to download anything by hand, just give the command
> install.packages("igraph", lib="~/.R/library")
in R and select a mirror site close to you. The
lib argument specifies the directory to
which the package will be installed. If not specified, this will be
default system wide R package directory. You must have write permissions
for this directory.
Also, consult your R documentation.
Installing the igraph Python package is a little bit more difficult, since chances are that you have to compile it for yourself (as long as there is no compile farm at the Python Package Index and we can't compile it ourselves to all platforms). First, check if there is a compiled version available for your system at igraph's Python Package Index page. If there is, just use that. (Python eggs should be put anywhere in your Python library path, executable installers should be executed of course). If there isn't, you'll have to compile it by hand. So, first install a recent C compiler.
We usually compile igraph with the GNU C compiler. If you are a Windows user, you can find it as part of the Cygwin environment or in the MinGW+MSYS project. You can also try Microsoft's free C compiler suite (or even worse, Visual Studio), but there are known issues with the compilation of igraph in MSVC, and you'll have to resolve them yourself by tweaking the source code. (Patches are welcome! :)). If you use Linux, gcc is usually included in your default system, but even if it isn't, there will be a package from which you can install it. (In Debian and Ubuntu Linux, you'll have to install the package called build-essential). If you have a Mac, gcc is part of the Xcode developer suite, which is usually included in your OS X install DVD, or can be obtained freely from the Apple Developer Connection website.
After having obtained a C compiler, you'll have to install an XML processing library called libxml2. Windows users should get it from this website (there are binary versions, no need to compile anything), Linux users should be able to find a package again in their respective distribution (Debian and Ubuntu users: install the libxml2 and libxml2-dev libraries). Mac users should not do anything, since libxml2 is part of the default system installation. However, you should check it anyway, launch a terminal and type the following command:
If you don't receive any error message, you can go on to the next step.
Now, get the igraph source from the Python Package Index, extract it to a directory and start the compilation. On Windows, launch the Cygwin or MinGW environment and type:
$ python setup.py build --compiler=cygwin
(Instead of --compiler=cygwin,
--compiler=mingw32 should also work, then you have no
POSIX emulation available (you don't really need it for
igraph yet), but you also won't need
cygwin1.dll). If the shell keeps on complaining that
it does not find the Python
interpreter, use its full path. For instance, if you have Python installed
C:\Devel\Python24, use the following command:
$ /cygdrive/c/devel/python24/python setup.py build --compiler=cygwin
If the compilation finished without errors, you can install the library:
$ python setup.py install
(Use the full path again if necessary).
Linux and Mac users should succeed with the following commands issued from the igraph root directory:
$ python setup.py build $ python setup.py install
Note that you'll need write permissions to the Python library path, so
usually you must have root permissions to issue the second command. If
you want to install it to a different directory, just copy everything
build/lib.* subdirectory to wherever you want.
|<< 2. Citing igraph||Chapter 3. Tutorial >>|