Prequisites and installation

HTSeq is available from the Python Package Index (PyPI):

To use HTSeq, you need Python 2.7 or 3.4 or above (3.0-3.3 are not supported), together with:

  • NumPy, a commonly used Python package for numerical calculations
  • Pysam, a Python interface to samtools.
  • To make plots you will need matplotlib, a plotting library.

At the moment, HTSeq supports Linux and OSX but not Windows operating systems, because one of the key dependencies, Pysam, lacks automatic support and none of the HTSeq authors have access to such a machine. However, it might work with some work, if you need support for this open an issue on our Github page.

HTSeq follows install conventions of many Python packages. In the best case, it should install from PyPI like this:

pip install HTSeq

If this does not work, please open an issue on Github and also try the instructions below.

Installation on Linux

You can choose to install HTSeq via your distribution packages or via pip. The former is generally recommended but might be updated less often than the pip version.

Distribution package manager

  • Ubuntu (e.g. for Python 2.7):

    sudo apt-get install build-essential python2.7-dev python-numpy python-matplotlib python-pysam python-htseq
    
  • Arch (e.g. using aura, you can grab the AUR packages otherwise):

    sudo pacman -S python python-numpy python-matplotlib
    sudo aura -A python-pysam python-htseq
    

PIP

PIP should take care of the requirements for you:

pip install HTSeq

Installing from GIT

If you want to install a development version, just clone the git repository, switch to the branch/commit you wish, and use setuptools:

python setup.py build
python setup.py install

Typical setuptools options are available (e.g. --prefix, --user).

To test the installation, change to another director than the build directory, start Python (by typing python or python2.7) and then try whether typing import HTSeq causes an error meesage.

Installation on MacOS X

Mac users should install NumPy as explained here in the NumPy/SciPy documentation. Note that you need to install Xcode to be able to compile NumPy. Due to the mess that Apple recently made out of Xcode, the whole process may be a slight bit more cumbersome than necessary, especially if you work with OSX Lion, so read the instructions carefully.

If you want to produce plots or use htseq-qa, you will also need matplotlib. (For htseq-count, it is not required.) There seems to be a binary package (a “Python egg”) available on the matplotlib SourceForge page.

To install HTSeq itself, download the source package from the HTSeq PyPI page, unpack the tarball, go into the directory with the unpacked files and type there:

python setup.py build

to compile HTSeq. If you get an error regarding the availability of a C compiler, you may need to set environment variables to point Python to the . The NumPy/SciPy installation instructions above cover this topic well and apply here, too, so simply do the same as you did to install NumPy.

Once building has been successful, use:

python setup.py --user

to install HTSeq for the current users. To make HTSeq available to all users, use instead:

python setup.py build
sudo python setup.py install

To test the installation, change to another director than the build directory, start Python (by typing python) and then try whether typing import HTSeq causes an error meesage.

MS Windows

If you have not yet installed Python, do so first. You can find an automatic installer for Windows on the Python download page. Make sure to use Python 2.7, not Python 3.3.

Then install the newest version of NumPy. Look on NumPy’s PyPI page for the automatic installer.

If you want to produce plots or use htseq-qa, you will also need matplotlib. (For htseq-count, it is not required.) Follow the installation instructions on their web page.

To install HTSeq itself, simply download the Windows installer from the HTSeq download page and run it.

To test your installation, start Python and then try whether typing import HTSeq causes an error meesage.

If you get the error message “ImportError: DLL load failed”, you are most likely missing the file MSVCR110.DLL on your system, which you can get by downloading and installing the file “vcredist_x86.exe” from this page.