Installation¶
Installation on Mac OS X¶
If a native Python environment is used, ensure that all dependencies are installed, ideally from the Python Package Index using pip. They are listed below.
A stand alone python distribution such as Anaconda Python or Enthought Canopy will likely include all of the above prerequisites.
It is then possible to install Bonsu from the Python Package Index using the following command:
$ pip install bonsu
Installation on Windows¶
Download 64-bit Python 2.7 or 3.6 for Microsoft Windows from the Python website and follow the installation instructions. Ensure that pip is included in the installation. Prerequisite binaries are available for download in the Python Package Index. They are also listed below.
Prerequisites are installed using the pip command found in the PythonScript folder. For example:
$ pip.exe install wxpython
Note
Prebuilt VTK packages 7.0 in PyPI generally requre a graphics card with OpenGL 3 support. VTK packages that do not require OpenGL 3 compatible graphics cards can be found here .
Alternatively, it is possible to install a stand alone python distribution such as Anaconda Python or Enthought Canopy. This will likely include all of the above prerequisites.
It is then possible to install Bonsu from the Python Package Index using the following command
$ pip.exe install bonsu
Installation on Linux/Unix¶
System Preparation¶
Before Bonsu can be installed from source, a number of software packages are required. They are namely:
wxPython
2.8.10
NumPy (FFTW aware)
1.4.1
H5Py
1.8
A reasonably new c++compiler such as gcc
As most Linux systems and services require Python natively, it is likely that Python is already provided in your distribution. Also, many distributions package all of the above prerequisites. Please check your distributions repositories.
It is also possible to install a stand alone python distribution such as that provided by Anaconda or Enthought. This will include most of the above prerequisites. In order to compile and use any additional packages (such as FFTW) into the stand alone distribution, a number of environmental variables should be set. In Anaconda Python, ensure that you create and activate your local environment:
$ conda create --name myenv
$ conda activate myenv
$ export PREFIX="/path/to/conda/myenv/"
Note on Building FFTW¶
To build FFTW into a stand alone python distribution such as that provided by Enthought , use the following sequence of commands:
$ ./configure --prefix=${PREFIX} --enable-threads --enable-shared
$ make
$ make install
Installing Bonsu¶
Source code for Bonsu is available for download here.
See also
Unpack the source code with the following:
$ tar -xvf Bonsu-{x}.tar.gz
where x is the current version.
Enter the newly created directory and first build the source:
$ python setup.py build
If this is successful you will now have a fully prepared built source tree for installation. To install the package type the following (super user privileges may be required):
$ python setup.py install
To install the package to a non-default location (perhaps where super user privileges are not required) use the following command:
$ python setup.py install --home=/my/install/path
The --home
option defines the installation base directory. Files are installed to the following directories under the installation base as follows
Type of file |
Installation directory |
---|---|
modules |
|
scripts |
|
data |
|
C headers |
|
To make Python find the distributions installed with this scheme, it is necessary to modify Python’s search path(s) to include the above.
To start the program, execute the following from the command line:
$ bonsu &
Note
For Linux users, a link to the program should be visible in the applications menu.