A Python library for phylogenetics and phylogenetic computing: reading, writing, simulation, processing and manipulation of phylogenetic trees (phylogenies) and characters. Current version 5.0.8 (requires Python >=3.7). The library has undergone major API changes from v4 to v5 (e.g., removal of deprecated modules, new tree structure classes). Release cadence is irregular, with v5.0.0 released in late 2023 and subsequent bugfix releases.
pip install dendropyVerified import paths — ran on the pinned version, not inferred.
Load a tree from a Newick file and print it.
Update imports to use the new 'dendropy' top-level namespace. Refer to migration guide on GitHub.
Double-check the file format and use the correct schema string. For example, use schema='nexus' for NEXUS files.
Specify the correct schema, e.g., Tree.get(..., schema='nexus') for NEXUS files. Ensure file contains tree data.
Replace 'dendropy.tree' with 'dendropy.Tree'.
No dependency data recorded yet.