ipyvue is a Python library that provides a Jupyter widget base for building interactive applications using Vue.js. It allows developers to create custom Jupyter widgets with Vue.js templates and data reactivity. The library is actively maintained with frequent minor releases addressing bug fixes and introducing new features, currently at version 1.12.0.
pip install ipyvueVerified import paths — ran on the pinned version, not inferred.
This example defines a simple Jupyter widget using `ipyvue.VueTemplate`. It renders a 'Hello, [name]!' message and an input field to update the 'name' data property reactively. The `template` property holds the Vue.js template, and `data` provides initial reactive properties.
Upgrade to ipyvue v1.11.2 or newer. If stuck on an older version, explicitly cast `0` to a string or another distinct non-object type if it causes issues.
Upgrade to ipyvue v1.11.1 or newer. Ensure your Vue templates are well-formed with distinct `<template>` start and end tags on separate lines and contain valid content.
Upgrade to ipyvue v1.11.0 or newer to enable dynamic `v_model` updates. For older versions, ensure `v_model` is only used for initial binding and state changes are handled via event listeners and direct data manipulation.
Review event handlers to ensure they correctly process potentially richer event data payloads. No direct fix needed if richer data is acceptable, but be aware of the change in data structure.
Ensure ipyvue is installed and its Jupyter extensions are enabled. After `pip install ipyvue`, run `jupyter nbextension enable --py --sys-prefix ipyvue` for Jupyter Notebook, or for JupyterLab (version 3+ typically handles this automatically), if issues persist, you might need `jupyter labextension install @jupyter-widgets/jupyterlab-manager` and potentially `jupyter labextension install jupyter-vue` if not automatically resolved. Restart your Jupyter kernel and browser page.
Install the package using pip: `pip install ipyvue`.
Enable the custom widget manager in Google Colab and ensure `ipyvue` (and any dependent libraries like `ipyvuetify`) are installed within the Colab environment: ```python from google.colab import output output.enable_custom_widget_manager() !pip install ipyvue ipyvuetify # include ipyvuetify if you are using it ```
Clear the JupyterLab extensions cache by removing the relevant tarball and then rebuild JupyterLab: ```bash rm -rf /path/to/your_env/share/jupyter/lab/extensions/jupyter-vue-*.tgz jupyter lab build ``` (Adjust `/path/to/your_env` to your specific Python environment's prefix or system installation).