Skip to content

Installing required libraries

chick edited this page Dec 4, 2013 · 21 revisions

One-Line Install

On Ubuntu 12.04 you can install Asp and all its dependencies with the following command:

      source <(wget -q https://raw.github.com/shoaibkamil/asp/master/install/ubuntu_12.04.sh -O -)

See YouTube Screencast for installing on Ubuntu. When done installing Asp, visit Specializers to install specializers.

Longer Install

First make sure you have installed boost.python

Then, release versions of Asp can be installed with

      pip install asp

If you receive a timeout, try:

      pip --default-timeout=1000 install --use-mirrors asp

For Mac OS X, you currently need to install the latest git version of CodePy (one of our dependencies) due to a recent bugfix. After installing Asp, you can update to the bleeding edge CodePy with

      pip uninstall codepy; pip install git+git://github.com/inducer/codepy

Note that in Mac OS X, you need to make sure the directory that contains boost.python is in the DYLD_LIBRARY_PATH, e.g.:

      export DYLD_LIBRARY_PATH=/Users/Foo/boost/lib

When done installing Asp, visit Specializers to install specializers.

Full Instructions for Installing

ASP currently requires Python 2.6+, plus the following libraries:

Other than Boost, these can be automatically installed if you're using the "release" versions of Asp with:

      pip install asp

This will install Asp and all necessary Python libraries into your system-wide Python directory. We prefer to isolate our Python libraries using virtualenv, since Asp is rapidly being developed.

In order to connect Boost.Python and CodePy, you may need to specify some things in ~/.aksetup-defaults.py. For MacOS 10.6, I have:

      BOOST_INC_DIR=['/Users/skamil/source/boost_1_43_0']
      BOOST_LIB_DIR=['/Users/skamil/source/boost_1_43_0/stage/lib']
      BOOST_PYTHON_LIBNAME=['boost_python']

For Ubuntu 10.10, I have:

      BOOST_PYTHON_LIBNAME=['boost_python-mt-py26']

For Ubuntu 11.04, I have:

      BOOST_PYTHON_LIBNAME=['boost_python-mt-py27']

For FreeBSD 8.2-RELEASE, I have:

      BOOST_INC_DIR=['/usr/local/include']
      BOOST_LIB_DIR=['/usr/local/lib']
      BOOST_PYTHON_LIBNAME=['boost_python']

If you don't set this up correctly, you will receive the error message "/usr/bin/ld: cannot find -lboost_python-gcc43-mt".

Python 3 is currently not tested. Tested on Python 2.6 with Ubuntu 10.10 and MacOS X 10.6, and with Python 2.7.1+ on Ubuntu 11.04. For FreeBSD 8.2, tested with Python 2.7.2 installed via ports. For Ubuntu, all but CodePy can be installed via apt-get:

     sudo apt-get install python-numpy python-mako libboost-python-dev python-pytools python-mock python-pip python-unittest2

For FreeBSD, the following ports should be installed:

     py27-numpy, py27-mako, py27-sqlite3, boost-python-libs

along with their dependencies. Otherwise, use easy_install or pip to install the rest of the required libraries:

     unittest2, mock, cgen, codepy

When done installing Asp, visit Specializers to install specializers.

Testing Your Installation

The Asp repository includes a set of tests and a simple specializer that you can use to test that your installation was successful and complete. Check out the repository with:

     git clone git://github.com/shoaibkamil/asp.git

Then "cd asp" and execute the run_tests.sh script with "./run_tests.sh".