Skip to content
Filipe edited this page Oct 1, 2021 · 9 revisions

Using Conda

compliance-checker depends on many external C libraries. The easiest way to install on MS-Windows/OS X/Linux is with conda.

$ conda install -c conda-forge compliance-checker

For more information on conda and installing the IOOS software stack see:

https://github.com/ioos/notebooks_demos/wiki/Installing-Conda-Python-with-the-IOOS-environment

Using pip

Starting from version 4.3.4 of compliance-checker one can just pip install the wheel with:

$ pip install compliance-checker 

To install locally, set up a virtual environment (recommend using virtualenv-burrito).

$ mkvirtualenv --no-site-packages compliance-checker
$ workon compliance-checker

The Python dependencies require several underlying system packages that most package managers should have.

OS X

Use HomeBrew

brew install hdf5 netcdf udunits gfortran libxml2 libxslt libffi

Ubuntu

Required Packages

  • libnetcdf-dev
  • libudunits2-dev
  • swig
  • python-dev
  • libhdf5-dev
  • libgdal-dev
  • libblas-dev
  • liblapack-dev
  • gfortran

Installing UDUnits on Ubuntu

wget 'ftp://ftp.unidata.ucar.edu/pub/udunits/udunits-2.1.24.tar.gz'
tar -zxvf udunits-2.1.24.tar.gz
cd udunits-2.1.24.tar.gz
./configure
make
sudo make install
cd ..

Linux infrequently updates the shared library cache (ldconfig). To force the cache to update:

sudo ldconfig -v

To ensure that UDUnits is properly installed and recognized by the operating system as a registered shared library:

ldconfig -p | grep udunits

You should see:

    libudunits2.so.0 (libc6,x86-64) => /usr/local/lib/libudunits2.so.0
    libudunits2.so (libc6,x86-64) => /usr/local/lib/libudunits2.so

Installing lxml on Ubuntu

Get the libxml2 and libxslt packages

sudo apt-get install libxml2-dev
sudo apt-get install libxslt1-dev
pip install lxml

Installing Compliance Checker

pip install compliance-checker

Testing your compliance checker installation:

Run python on your virtual environment and try:

from compliance_checker.runner import ComplianceChecker

If it succeeds, then the Compliance Checker should be working correctly.

Clone this wiki locally