Installing and running khmer

Build requirements

You’ll need a 64-bit operating system, internet access, a C++11 compatible compiler (e.g. GCC 4.8 or greater), GNU Make, and Python version 3.3 or greater.

Note

The khmer package is no longer compatible with Python 2!

Note

If you are running khmer in a HPC environment or for other reasons do not have administrative privileges, we strongly suggest installing khmer in a virtual environment. See the relevant instructions below.

Prerequisites

OS X

  1. Start by installing the Xcode command line tools if they are not already installed.

    xcode-select –install

  2. If it’s not already installed, install Python version 3 using Homebrew or Anaconda <https://www.anaconda.com/download/>.

Linux

  1. Use your Linux distribution’s package manager to install Python 3 and essential build tools such as Make and g++.

    • On recent versions of Debian and Ubuntu this can be done with:

      sudo apt-get install python3-dev python3-venv build-essential
      
    • For recent versions of Red Hat, Fedora, and CentOS you can invoke:

      sudo yum install -y python3-devel gcc-c++ make
      

Create a virtual environment

Anaconda Python

If you are using the Anaconda Python distribution:

conda create --name khmerEnv python=3.6
source activate khmerEnv

The first command creates the virtual environment in a dedicated location in your home directory and only needs to be invoked once. The second command activates the environment and must be invoked every time you begin a new terminal session. The activate command can be invoked from any directory in your system.

System/Homebrew Python

If you are using the system or Homebrew Python distribution:

python3 -m venv khmerEnv
source khmerEnv/bin/activate

The first command creates the virtual environment in your current directory and only needs to be invoked once. The second command activates the environment and must be invoked every time you begin a new terminal session. The activate command will only work if you provide the correct relative or absolute path of the activate file.

Installing khmer

Once the virtual environment is created and activated, you can use pip to install khmer and its dependencies.

pip install khmer
comments powered by Disqus