The easiest way to install OpenGHG is using pip, first ensure you have a recent version of Python installed.
Checking your Python installation¶
OpenGHG is developed and tested on Linux and MacOS, support for Windows is planned.
To install OpenGHG, you first need to install Python >= 3.7. To check if you have Python 3.7 installed type;
This should print out the version number of the Python you have available.
If the version number is
2.x then you must use the
python3 command, if this this is the case, try;
and see if you have a Python 3 that has a version number >= 3.7. If so, please use
python3 instead of
We highly recommend creating a separate virtual environment for
openghg. This ensures the correct versions
of libraries can be installed without making changes to versions of libraries needed for other projects / programs.
python -m venv /path/to/env/openghg_env # Activate the environment source /path/to/end/bin/activate
Clone and install¶
OpenGHG is currently very early in its development process so the only way to install the library is by cloning the repository and installing manually using pip.
git clone https://github.com/openghg/openghg.git cd openghg pip install .
To upgrade a currently installed version
pip install --upgrade openghg
For developers please follow the instructions for creation of a virtual environment above and then follow the instructions below.
git clone https://github.com/openghg/openghg cd openghg pip install -r requirements.txt pip install -r requirements-dev.txt
As a developer you may want to run the tests and add new tests for functions you’d like to contribute the project. To do this type:
If you haven’t installed
openghg to your virtual environment you can add the folder path to your PYTHONPATH.
This allows the library to be used easily without the need for reinstallation after changes.
You can now build the documentation.
cd doc make