Child pages
  • Easy-OCW - A Guide to Simplifying OCW Installation
Skip to end of metadata
Go to start of metadata

Introduction

Deprecated

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

  • A machine running Ubuntu 12.04 or 14.04 (both have been tested). If you try on another version let us know on the mailing list how it goes!
  • Sudo access on the machine. Unfortunately, at the moment sudo is required for some of the installations. Improvements to the installation are ongoing. Hopefully this dependency will be removed soon.

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:

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.

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.

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

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

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

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

  • A recent version of OS X. Anything reasonably new should be sufficient however the installation is currently only tested/maintained on 10.8.x or newer.
  • The XCode command line tools. Google-ing for "install command line tools OS X <version of OS X here>" should find you a useful guide for your version of OS X.

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).

  • distribute: If not present on your system
  • pip: If not present on your system
  • virtualenv: If required during install with -e flag
  • conda: Used to install binary distributions for numpy, scipy, matplotlib, basemap, and netcdf4. All of these binary packages and any of their dependencies are installed into an isolated environment in ~/anaconda by default.
  • requests: Used to make HTTP requests. The OCW UI and Toolkit use this.
  • bottle: Simple Python backend webserver used by the OCW UI.
  • pydap: A Python library for connecting to OpenDAP servers. The Toolkit uses this to handle OpenDAP connections.
  • webtest: A Python library to improve testing of web applications. The OCW UI backend uses this for testing.
  • nose: A better Python test runner/handler.

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:

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

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.

IMPORTANT NOTE

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.

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

Install OCW

 

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

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.

  • No labels