CLI tool
etetoolkit/ete avatar
etetoolkit/ete

ETE: a Python toolkit for reading, editing and drawing phylogenetic trees

Python package for building, comparing, annotating, manipulating and visualising trees. It provides a comprehensive API and a collection of command line tools, including utilities to work with the NCBI taxonomy tree.

884 stars232 forksPythonGPL-3.0

At a glance

What is it?
ETE is a Python package for building, comparing, annotating and visualising trees, with Newick and Nexus support, hooks into the NCBI and GTDB taxonomies, and an explorer that opens a tree in a browser. The current generation of the package installs as ete4 and ships Cython extensions for its tree core.
Who is it for?
Adopt ETE when your work involves programmatic tree handling rather than drawing one plot, because the Newick and Nexus readers, the topology and annotation search functions, the NCBI and GTDB taxonomy links and the comparison utilities are the parts a script actually needs. Do not pick it for a one-off diagram you could draw elsewhere, since the package brings a dependency list, an optional PyQt treeview and a browser server you would not use.
Can I use it commercially?
Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 144 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Trees as data objects, not pictures

ETE stands for Environment for Tree Exploration, and the description is precise about what it does: it assists in the automated manipulation, analysis and visualisation of trees, and it is mainly written in Python with extra functionality aimed at phylogenetic trees. The feature list runs through reading and writing support for Newick and Nexus formats, a large set of functions for traversing, searching and manipulating tree topologies and node annotations, integration with the NCBI taxonomic database and the GTDB database, a programmatic visualisation framework, visualisation of huge trees based on adaptive zooming, tree comparison, and phylogenetic functions covering orthology detection and phylogenetic distance. The distinction that matters is between a library and a renderer. This is the library: you load a tree, mutate it, query it and then decide what to draw.

Three installation routes and one package name to get right

The quick route is a single pip command, and it installs the latest release from PyPI.

sh
pip install ete4

The conda-forge route is equally short.

sh
conda install conda-forge::ete4

If you want the very latest commit rather than a release, the README gives a direct archive install.

sh
pip install --force-reinstall https://github.com/etetoolkit/ete/archive/ete4.zip

The package name has moved with the generations of the project. The repository ships ete4, the console script is ete4, the optional extras are named after the ete4 package, and the default branch is ete4. Older releases were known as ete, ete2 and ete3, and the support links still list tags for all of them, so if you are following an old tutorial or an old Stack Overflow answer, check which generation it refers to. The pyproject metadata gives the current version as 4.4.0 and requires Python 3.7 or later.

The core is compiled, not pure Python

The build system reveals how the performance-critical parts are handled. The build requires setuptools 61 or later together with cython, and the extension modules are declared explicitly: ete4.core.tree from ete4/core/tree.pyx, ete4.core.operations from ete4/core/operations.pyx, and ete4.parser.newick from ete4/parser/newick.pyx. The setup script builds every .pyx file it finds recursively, with extra compile args of -O3, and it sets the language level to 3 and enables embedsignature so call signatures are available. So the tree object, the topology operations and the Newick parser are Cython rather than plain Python. That is the reason the package installs cython as a build requirement and the reason a source install needs a working compiler. The treeview module is the other heavy piece, and it depends on PyQt, which is why it is an optional extra.

Optional extras map to the features you actually want

The extras are declared in pyproject.toml and they line up with the optional modules. The treeview extra pulls in pyqt6, which is what the interactive desktop tree viewer needs. The render_sm extra pulls in selenium, used for smartview file rendering. The treediff extra pulls in lap, for tree comparison. The test extra pulls in pytest 6 or later, and the doc extra pulls in sphinx. The base dependencies are bottle, cheroot, brotli, numpy, scipy and requests, and the bottle and cheroot pair is the web server that backs the explorer. The README shows the editable form with a single extra, and the form with several.

sh
pip install -e .[treeview]
sh
pip install -e .[treeview,test,doc,render_sm]

For local development the README asks you to clone the repository, install the dependencies, either with conda or pip, and then build and install from the repository root with pip install -e .

Loading a tree and opening the explorer

Loading a Newick file and looking at it is a two-liner in Python, or a single command from the shell. The browser-based route goes through the ete4 utility.

sh
ete4 explore -t my_tree.nw

The Python equivalent reads the file into a Tree object and calls the explore method.

py
from ete4 import Tree

t = Tree(open('my_tree.nw'))

t.explore()

Either way you get a browser window with an interface for exploring the tree. That is a meaningful difference from a plotting library: the tree stays an object on the server side while the browser renders it, so the same session can be continued with more queries. The repository holds example material for each area, including directories for evol, explorer, general, phylogenies, phyloxml and treeview cases, and the ETE Gallery repository holds a tutorial, examples and course material for the graphical side.

Taxonomy lookups for NCBI and GTDB

Two of the headline features are taxonomy integrations, and they exist because most real phylogenetic work anchors on named taxa rather than on opaque branch identifiers. The NCBI Taxonomic database integration gives the package a link to the authoritative taxonomy, and the GTDB database integration does the same for the Genome Taxonomy Database, which organises prokaryotic genomes. In practice this is what turns a tree of unnamed sequences into a tree you can label with species names and compare against a reference. The Python packages are separated into their own directories, ete4/ncbi_taxonomy and ete4/gtdb_taxonomy, alongside ete4/orthoxml for the orthology format, so the taxonomy layers are optional modules rather than something every import drags in.

Tree comparison and phylogenetic functions

Comparison is listed as its own feature and phylogenetic functions sit under it, with orthology detection and phylogenetic distance named specifically. Comparing trees is the operation you need when you have two inferred topologies and want to know where they disagree, and orthology detection is the operation you need when a tree is supposed to represent relationships between genes. The package provides a treematcher module, and the tree diff capability lives behind the treediff extra, which depends on lap, a library for linear assignment problems. That dependency is a reasonable hint about the algorithm: matching trees between two topologies can be framed as an assignment problem, and lap solves it. The README also carries a hidden note listing what the project used to claim and no longer does, with tree comparison and tree diff among the entries flagged for checking, which is worth keeping in mind when you read older papers about this toolkit.

Citing it, reporting bugs, and the licence

The README asks users to cite the package, giving a specific citation for the previous generation: Jaime Huerta-Cepas, Francois Serra and Peer Bork, ETE 3: Reconstruction, analysis and visualization of phylogenomic data, published in Molecular Biology and Evolution in 2016. There is a hidden note in the README saying a paper for the current generation is still to be published and the citation should be updated, so check which version your work used before citing. Support goes through public channels: Biostars with the etetoolkit tag, Stack Overflow with the etetoolkit or ete4 tags, GitHub issues for bug reports and feature requests, and a mailing list at groups.google.com whose first message waits for account validation. The licence field on the repository says GPL-3.0, and the package metadata specifies GPL-3.0-or-later with the LICENSE file listed, which is the kind of detail that matters if you intend to embed the package inside a product.

Editorial conclusion

Adopt ETE when your work involves programmatic tree handling rather than drawing one plot, because the Newick and Nexus readers, the topology and annotation search functions, the NCBI and GTDB taxonomy links and the comparison utilities are the parts a script actually needs. Do not pick it for a one-off diagram you could draw elsewhere, since the package brings a dependency list, an optional PyQt treeview and a browser server you would not use. Verify first that your Python is 3.7 or later, that you install the ete4 name rather than an older ete release, and that you read the licence terms yourself, since the project is distributed under GPL-3.0-or-later and the last push to the repository was on 2026-06-01 with release 4.4.0 published on 2025-09-03.

Frequently asked questions

How do I install ETE?

Run pip install ete4 for the latest release from PyPI, or conda install conda-forge::ete4 for the conda-forge build. For the most recent commit the README gives pip install --force-reinstall https://github.com/etetoolkit/ete/archive/ete4.zip.

How do I open a tree file in the ETE explorer?

Run ete4 explore -t my_tree.nw from the shell, or in Python load it with Tree(open('my_tree.nw')) and call t.explore(). Either way a browser window opens with an interface for exploring the tree.

Does ETE need PyQt?

Only for the treeview module. The treeview extra pulls in pyqt6, and the README shows pip install -e .[treeview] for a local editable install with it. The base install does not include it.

What are the extra packages available in ETE?

The optional dependencies are treeview for pyqt6, render_sm for selenium, treediff for lap, test for pytest and doc for sphinx. The base dependencies are bottle, cheroot, brotli, numpy, scipy and requests.

What licence is ETE released under and what are its requirements?

The licence field on the repository says GPL-3.0, and the package metadata specifies GPL-3.0-or-later. The project requires Python 3.7 or later, and its core tree, operations and Newick parser modules are Cython extensions compiled at install time.

Official sources

  1. etetoolkit/ete on GitHub
  2. License: GPL-3.0
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/etetoolkit-ete.svg)](https://hysenlabs.com/projects/etetoolkit-ete)

Was this useful?