Installing and running khmer

You’ll need Python 2.7+ and internet access.

Build requirements

OS X

  1. Install Xcode from the Mac App Store (requires root)

  2. Register as an Apple Developer

  3. Install the Xcode command-line tools: Xcode -> preferences -> Downloads -> Command Line Tools (requires root)

  4. From a terminal install virtualenv/pip:

    curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py
    python get-pip.py --user
    #add the python user binaries to your path if needed
    echo "PATH=\$PATH:`python2.7 -c "import site; print site.getuserbase()"`/bin; export PATH" >> ~/.bash_profile
    source ~/.bash_profile
    pip install --user virtualenv

Linux

Install the python development environment, virtualenv, pip, and gcc; on Debian and Ubuntu this can be done with:

apt-get install python2.7-dev python-virtualenv python-pip gcc

Latest stable release

  1. Create a virtualenv and activate it:

    virtualenv env
    source env/bin/activate
  2. Use pip to download, build, and install khmer and its dependencies:

    pip install khmer
  3. The scripts are now in the env/bin directory and ready for your use. You can directly use them by name, see khmer’s command-line interface.

  4. When returning to khmer after installing it you will need to reactivate the virtualenv first:

    source env/bin/activate

Latest development branch

Repeat the above but modify the pip install line:

pip install -e git+git@github.com:ged-lab/khmer.git@master#egg=khmer

Run the tests

From within your activated virtualenv you will find the source in env/src/khmer:

cd env/src/khmer
make test
comments powered by Disqus

Table Of Contents

Previous topic

Introduction to khmer

Next topic

A few examples

This Page

Edit this document!

This file can be edited directly through the Web. Anyone can update and fix errors in this document with few clicks -- no downloads needed.

  1. Go to Installing and running khmer on GitHub.
  2. Edit files using GitHub's text editor in your web browser (see the 'Edit' tab on the top right of the file)
  3. Fill in the Commit message text box at the bottom of the page describing why you made the changes. Press the Propose file change button next to it when done.
  4. Then click Send a pull request.
  5. Your changes are now queued for review under the project's Pull requests tab on GitHub!

For an introduction to the documentation format please see the reST primer.