Biogeme installation
Installation packages are provided for Mac OS X, Windows, and Ubuntu. However, it is advised to install the software from sources, so that it is tailored to your machine. See the Compile from sources section to do so.
Make sure that the
directory /usr/local/share/biogeme
does
not exist and, if it does, remove it: rm -r
/usr/local/share/biogeme
.
Make sure that python 3 is installed. The best way to
install it is
using homebrew. If you
have not done so yet, install homebrew using the
instructions on their webpage. Then type brew
install python3
.
Download
the disk
image
, and double-click on the file
Biogeme-2.5.pkg
to install the command line
tools.
In the event that you receive the
message "Biogeme-2.5.pkg" can't be opened
because it is from an unidentified developer."
,
than right-click on the file, and
select Open with...
and
then Installer.app
. You will be
asked "Biogeme-2.5.pkg" is from an unidentified
developer. Are you sure you want to open
it?
. Then click Open
.
The following executables are installed in the
directory /usr/local/bin
:
pythonbiogeme
,
pybiogeme
,
gtkguibiogeme
,
biogeme
,
biosim
,
biomerge
,
mod2py
,
histogram
,
weightedhistogram
,
biosampledata
,
biocheckdata
,
biopreparedata
. Moreover, the
directory /usr/local/share/biogeme
is created, and
contains the following files:
bioMatrix.py
,
bio_expression.py
,
bio_iterator.py
,
biocheckdata.py
,
biogeme.py
,
biopreparedata.py
,
biosampledata.py
,
boxcox.py
,
cnl.py
,
distributions.py
,
generateHistogram.py
,
generateWeightedHistogram.py
,
histogram.py
,
legendre.py
,
loglikelihood.py
,
mev.py
,
nested.py
,
simulateDiscreteDistribution.py
,
statistics.py
,
weightedloglikelihood.py
.
You can use the deb
package
to install the command line version of
biogeme, using dpkg -i biogeme_2.5-1_amd64.deb
.
Windows
installer
, execute it and follow the
instructions. From the graphical user interface (GUI),
PythonBiogeme, BisonBiogeme and BisonBiosim can be
executed. Note that running BisonBiogeme and
BisonBiosim requires to close the GUI after the
execution is complete. This is not necessary with PythonBiogeme.
Note that versions of Biogeme running on Windows may be slow. For models requiring a significant computational effort, it is recommended to use Mac OS X or Linux.
Compile from sources
Although executables are distributed (see the Download menu in the top navigation bar), you may want to install the software from sources, so that the executables are tuned for your own machine.
Download the tarball here.
It is assumed that you are working on a machine where the GNU development tools have been installed, in particular the GNU C++ compiler.
Before describing the installation procedure, here are some OS specific comments.
If you are working on Mac OS X, make sure to install Xcode and Python 3. Note that Python 2, which is usually installed by default, cannot be used. Also, it won't compile on Mac against the macports distribution of Python 3.2. It's fine to compile it again a custom build of Python 3.2, or the macports distribution of Python 3.1. After installation, one can reinstall macports Python 3.2, they won't interfere once build and installed. In any case, executables for Macintosh are also available. Biogeme has been developed and tested on that platform with the following tools:
- g++ 4.5.1
- Apple LLVM version 7.3.0
- Python 3.1.2, Python 3.2, Python 3.3, Python 3.4 and Python 3.5
- flex 2.5.35
In general, the GNU tools are directly available on any machines running linux.
Make sure that Python 3 is installed. On some platforms, it is also necessary to install python3-dev (onUbuntu, use sudo apt-get install python3-dev
).
It has been tested on the following platforms
- Red Hat 4.1.2-48
- Ubuntu 4.4.3-4ubuntu5
Cygwin is a large
collection of GNU and Open Source tools which
provide functionality similar to a Linux
distribution on Windows. Make sure that the
following packages are installed: autoconf,
automake, bison, flex, gcc-g++, libstdc++, libtool,
make, python3
.
MinGW, a contraction of "Minimalist GNU for Windows", is a minimalist development environment for native Microsoft Windows applications.
To install a proper environment to compile Biogeme, follow these steps (see also wiki.qt.io/MSYS2):
- Run the installer x86_64 from msys2.github.io
update-core
- Exit msys2 and restart
pacman -Sy
- Exit msys2 and restart
pacman -Syuu
- Exit msys2 and restart
pacman --needed -S bash pacman pacman-mirrors msys2-runtime
- Exit msys2 and restart
pacman -Syuu (again)
- Exit msys2 and restart
pacman -S mingw-w64-x86_64-pkg-config
pacman -S base-devel
pacman -S mingw-w64-x86_64-python3
pacman -S mingw-w64-x86_64-gcc
In order to install pythonbiogeme, python
3
must also be installed
(see python.org). Note that older
versions of python, such as python 2.x
are not compatible. python 3.1
or a later
version is required.
To install biogeme, download download the file biogeme-2.5.tar.gz
in a temporary directory, and apply the following procedure:
tar xvzf biogeme-2.5.tar-gz
cd biogeme-2.5
./configure --enable-bison --enable-python
make
sudo make install
The configure
step is pretty verbose. The relevant information is displayed at the end, and looks like:
biogeme 2.5: Automatic configuration OK. Build biogeme............yes Build biomerge...........yes Build biosim.............yes Build python biogeme.....yes (Python version 3.5) Build GTK GUI version....no (use option --enable-gui) Static executables.......no (use option --enable-staticexec) Long double..............no (use option --enable-longdouble) Executables for debug....no (use option --enable-debug) Versioned installation...no (use option --enable-versioned)
It reports those features that will be built, and
those that will not. Some features are
not installed because they have not been "enabled"
using the corresponding --enable
option. Some features require additional software,
such as python 3.5
for PythonBiogeme or GTK for the graphical user interface.
The sudo
command is designed to run the make
install
with administrator ("super user") privileges. If you do not have
such privileges on your machine, contact the system administrator
who will help you finding an appropriate way to install the
software.