Skip to content

install.sh: detect and deactivate conda before uv sync to avoid Qt/XCB plugin conflicts #76

@pecomyint

Description

@pecomyint

Problem

When install.sh runs inside a terminal that has conda auto-activated (e.g. via conda init), uv sync picks up conda's environment and links against conda's C++ / Qt libraries. After installation, the resulting .venv carries stale references to conda's shared libraries — particularly the XCB platform plugin — which were compiled against a different C++ ABI.

This causes runtime errors like:

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" ...

because the XCB plugin in the uv-installed Qt package was compiled against system libraries, but conda's libraries shadow them at link time.

Proposed fix

Add a conda detection + deactivation step in install.sh before uv sync runs (i.e. in main() or a new helper called from main()):

  1. Check whether conda is active ($CONDA_DEFAULT_ENV is set, or conda is on PATH).
  2. If detected, run conda deactivate (possibly in a loop until $CONDA_DEFAULT_ENV is unset, since stacked activations are possible).
  3. Inform the user that conda was deactivated for the duration of the install.
  4. Proceed with uv sync in a clean environment so Qt and its platform plugins link against the correct system libraries.

Acceptance criteria

  • install.sh detects an active conda environment and deactivates it before calling uv sync.
  • A clear info message is printed when conda is deactivated.
  • Qt/XCB plugin loads correctly after a fresh install on a machine with conda auto-activated.

Metadata

Metadata

Assignees

Labels

in progressThis issue is currently being worked on

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions