Python 2.7 or Python 3.5 environment¶
If in a restricted environment with no local administrator access, python can be installed by running:
msiexec /a python-2.7.11.msi TARGETDIR=C:\Python27
Or by launching the version 3.5 installer and selecting not to install for all users (only single user install).
Ensure pip is installed:
cd C:\Python27 python -m ensurepip
Upgrade and Install python virtualenv:
python -m pip install --upgrade pip setuptools virtualenv
Create an AGDC virtualenv:
mkdir C:\envs Scripts\virtualenv C:\envs\agdcv2
3.5 only workaround: Copy
vcruntime140.dll from Python install dir into
The python virtual environment isolates this python installation from other python installations (which may be in use for other application software) to prevent conflicts between different python module versions.
On windows systems by default there are no ready configured compilers, and so libraries needed for some python modules must be obtained in precompiled (binary) form.
Download and install binary wheels from http://www.lfd.uci.edu/~gohlke/pythonlibs/
You will need to download at least:
The following may also be useful:
Install these packages by running in your
pip install *.whl
It may be necessary to manually replace
*.whl with the full filenames for each
.whl file (unless using a unix-like shell instead of the standard windows command line
For 3.5 only
If there are problems loading libraries. Try:
copy site-packages/matplotlib/msvcp140.dll site-packages/osgeo/
Also, install the python notebook interface for working with datacube example notebooks:
pip install jupyter
An easy to install version of PostgreSQL can be downloaded from http://sourceforge.net/projects/postgresqlportable/ . It can install and run as an unprivileged windows user.
After installing, launch
PostgreSQLPortable.exe (and place a shortcut in the windows Startup menu).
To prepare the database for first use, enter the following commands in the PostgrSQL Portable window, substituting “u12345” with your windows login user-ID:
create role u12345 superuser login; create database datacube;
Obtain a current copy of the datacube source code from GitHub. A simple way is to extract https://github.com/opendatacube/datacube-core/archive/develop.zip into a subdirectory of the python environment.
Install the datacube module by running:
cd datacube-core-develop python setup.py install
Extra instructions for installing Compliance Checker¶
pip install cf_units
- Download and install udunits2 from gohlke
- Edit site-packages/cf_units/etc/site.cfg with path to udunits2.dll which should be venv/share/udunits/udunits2.dll