Proposal: Split visualization modules (Qt/Smartview) from core ETE4 tree structure & algorithms
Background
When running ETE4 on Ubuntu servers, Docker, or any headless environment, importing ETE4 often triggers a chain of visualization-related dependencies (PyQt5, X11 libraries, libxcb-cursor, etc.).
However, many use cases (tree parsing, manipulation, phylogenetic analysis, taxonomy queries) do NOT require any visualization. Users still encounter runtime errors related to Qt platform plugins even if they never call Tree.show() or TreeStyle.
For example:
qt.qpa.plugin: Could not load the Qt platform plugin "xcb"
This application failed to start because no Qt platform plugin could be initialized.
This makes ETE4 harder to use in non-GUI environments, despite visualization not being needed.
Proposal
Split ETE4 into core and visualization modules:
- ete4-core
- Tree structures, parsers, phylogenetic algorithms, taxonomy modules
- No GUI dependencies
- ete4-viz
treeview + smartview visualization
- PyQt5, Flask, and all GUI/web-related dependencies
Alternatively, keep a single repository but make visualization optional extras:
pip install ete4[core] # only tree structure + algorithms
pip install ete4[viz] # adds PyQt5 & Smartview Flask deps
pip install ete4[full] # current default behavior
This could be done by refactoring setup.cfg / pyproject.toml with extras_require.
Benefits
✅ Server/Docker friendly
- Users can use ete4-core without heavy GUI dependencies
✅ Less runtime issues in headless environments
- No more Qt platform plugin errors
✅ Cleaner separation of concerns
- Core data structures & algorithms decoupled from visualization layer
Reference implementations
Other scientific Python libraries already do similar optional GUI dependency patterns:
matplotlib → pip install matplotlib[qt] only when needed
scikit-image → separates core image algorithms from viewer GUI
Question
Would the maintainers consider this refactor?
It should be mostly moving treeview/ & smartview/ into an optional subpackage with extras_require.
Thanks for considering this! It would make ETE4 much easier to use in headless Ubuntu/Docker environments.
Proposal: Split visualization modules (Qt/Smartview) from core ETE4 tree structure & algorithms
Background
When running ETE4 on Ubuntu servers, Docker, or any headless environment, importing ETE4 often triggers a chain of visualization-related dependencies (PyQt5, X11 libraries,
libxcb-cursor, etc.).However, many use cases (tree parsing, manipulation, phylogenetic analysis, taxonomy queries) do NOT require any visualization. Users still encounter runtime errors related to Qt platform plugins even if they never call
Tree.show()orTreeStyle.For example:
This makes ETE4 harder to use in non-GUI environments, despite visualization not being needed.
Proposal
Split ETE4 into core and visualization modules:
treeview+smartviewvisualizationAlternatively, keep a single repository but make visualization optional extras:
This could be done by refactoring
setup.cfg/pyproject.tomlwithextras_require.Benefits
✅ Server/Docker friendly
✅ Less runtime issues in headless environments
✅ Cleaner separation of concerns
Reference implementations
Other scientific Python libraries already do similar optional GUI dependency patterns:
matplotlib→pip install matplotlib[qt]only when neededscikit-image→ separates core image algorithms from viewer GUIQuestion
Would the maintainers consider this refactor?
It should be mostly moving
treeview/&smartview/into an optional subpackage withextras_require.Thanks for considering this! It would make ETE4 much easier to use in headless Ubuntu/Docker environments.