Introduction

This particular installation method will soon be phased out in favor of using a conda package. Use at your own risk.

Easy-OCW is a distinct OCW module which aims to take the pain out of getting up and running with OCW.

It is highly recommended that you remove any dependencies that you may have previously installed on your system. It's possible that they can cause problems during install.

Installation on Ubuntu

Requirements

How To

Get a copy of the OCW codebase. You can get the latest release from the OCW Project Website or you can grab the latest code from the repository with the following command:

cd
git clone http://git-wip-us.apache.org/repos/asf/climate.git

Move to the easy-ocw directory and use the ubuntu install script.

Please execute the script as source. The script sets some environment variables which won't be set unless the script is executed via the source command.

cd climate/easy-ocw
source install-ubuntu.sh

The install-ubuntu.sh script will install and configure a conda virtual environment named venv-ocw in the easy-ocw directory for you.

This is the recommended way of installing ocw module. Failure to follow the above step might break your original python package.

Use and Testing

Whenever you want to do use/work on OCW, you need to source the conda virtualenv environment.

source activate venv-ocw

If you want to stop using the OCW Python environment, you'll need to deactivate it.

source deactivate

Please do not use ocw module without activating the venv-ocw virtual environment.

Head on over to the examples and run one of them.

cd ../examples
python simple_model_to_model_bias.py

After the evaluation runs you should find a .png file in the examples directory. Congratulations, your install was successful!

If you experience any issues while installing ocw on Ubuntu please write to us with the entire error log at dev@climate.apache.org.

Installation on OS X

The OSX installation is currently having some issues which should be fixed soon. Follow the below steps at your own risk.

Requirements

Installation Information

The following packages will be installed. Some of these are optionally installed if you ask for a virtualenv to be created (more on that later).

How To

Get a copy of the OCW codebase. You can get the latest release from the OCW Project Website or you can grab the latest code from the repository with the following command:

cd
git clone http://git-wip-us.apache.org/repos/asf/climate.git

Move to the easy-ocw directory and use the OS X install script.

cd climate/easy-ocw
./install-osx.sh -e

The -e flag will install and configure a virtualenv named ocw for you. This is the recommended way of installing the dependencies. If you want, you can create your own virtualenv before running the installation or you can let the install pollute your system python (NOT RECOMMENDED). If you choose to not use a virtualenv for the install you will (most likely) need to sudo.

At this stage, if you do not get a clean install, please check that your Python installation is recent (2.7.x) and that there are no existing virtualenv environment variables which could conflict with the OS specific install.

Use and Testing

Whenever you want to do use/work on OCW, you need to source the virtualenv environment using the conda syntax (assuming you opted to have one installed).  This is a side effect of using conda to install the packages.

# If you used the -e flag it would be this:
source ~/ocw/bin/activate ~/ocw
 
# If you created a virtualenv of your own and installed without the -e flag:
source <path/to/virtualenv>/bin/activate <path/to/virtualenv>

Install the Open Climate Workbench

Be sure to first switch into your virtual environment and run the setup.py to install OCW into the environment

# Assuming you are still in the easy-ocw folder (change back into the main climate folder)
cd ../.
# You should be in the climate folder now, so run the setup.py
python setup.py install
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/ocw
...
running install_egg_info
Writing /Users/cgoodale/ocw/lib/python2.7/site-packages/Apache_Open_Climate_Workbench-0.4-py2.7.egg-info

 

Head on over to the examples and run one of them.

cd ../examples
python simple_model_to_model_bias.py

After the evaluation runs you should find a .png file in the examples directory. Congratulations, your install was successful!

 

If you want to stop using the OCW Python environment, you'll need to deactivate it.

source deactivate