Installation from Source Code¶
To install from the source code, please follow the instructions below.
1. Python¶
Make sure you have Python 3 installed (versions 3.4, 3.5 and 3.6 are supported). Installing Python is easy on all standard platforms. We recommend that you install scientific python distribution from Anaconda.
2. Clone or Download the Package¶
Clone the repository on github.org or download a source bundle from Quantarhei release page on github.org.
Cloning from Github¶
To clone the Quantarhei repository, you need Git to be installed on your computer. If you have it, just type
$ git clone https://github.com/tmancal74/quantarhei.git
Downloading the Package¶
Alternatively, if you do not want to install Git, you can download the package in zip format. Got to Quantarhei release page on github.org, download the zip file and unzip it in a suitable directory.
3. Dependencies¶
You need to first have the dependencies installed. Check the package dependencies in section Quantarhei’s Dependencies and install them.
This is usually as easy as typing
$ pip install numpy
to install the numpy package, which is one of the most important dependencies of Quantarhei. Do this similarly for all required packages.
4. Installation¶
With all dependencies installed there are two ways how you can install the Quantarhei package.
Installation with pip¶
First you can create a source code distribution by runnning Quantarhei setup script. Enter the directory containing the package (it will contain a Python script called setup.py) and type
$ python setup.py sdist
This will create a directory called dist (if it did not already exist), and it will put in a distribution file, e.g. quantarhei-0.0.36.tar.gz, into it. This file can be then installed by the pip command
$ pip install dist/quantarhei-0.0.36.tar.gz
Now Quantarhei is installed on your system. You can check the installation by pip. Just type
$ pip show quantarhei
and you get the following message
Name: quantarhei
Version: 0.0.36
Summary: Quantarhei: Open Quantum System Theory for Molecular Systems
Home-page: https://github.com/tmancal74/quantarhei
Author: Tomas Mancal
Author-email: mancal@karlov.mff.cuni.cz
License: MIT
Location: /Users/tomas/anaconda3/lib/python3.6/site-packages
Requires: h5py, numpy, terminaltables, scipy, matplotlib
You can always remove the installation by typing
$ pip uninstall quantarhei
Installation by setup.py¶
Alternatively, you can do without pip in the installation of Quantarhei (except the you have to install its dependencies which would be quite tedious to install manually). In the Quantarhei directory type
$ python setup.py install
and all is done. The message from pip will now read
$ pip show quantarhei
Name: quantarhei
Version: 0.0.36
Summary: Quantarhei: Open Quantum System Theory for Molecular Systems
Home-page: https://github.com/tmancal74/quantarhei
Author: Tomas Mancal
Author-email: mancal@karlov.mff.cuni.cz
License: MIT
Location: /Users/tomas/anaconda3/lib/python3.6/site-packages/quantarhei-0.0.36-py3.6.egg
Requires: numpy, scipy, matplotlib, h5py, terminaltables
and the only difference seems to be that the package is install in form of an egg.
Removal of the installation works the same way as above.