Skip to content

Cannot install packages that depend on a newer version of an already installed package #213

@crnh

Description

@crnh

It is currently not possible to install a Python package if it depends on a newer version of a package already provided by Pyodide.
For example, Optiland depends on typing-extensions >= 4.13.2, but the version of Pyodide currently used by Shinylive already provides typing-extensions == 4.11.0. Installing Optiland results in a ValueError:

ValueError: Requested 'typing-extensions>=4.13.2', but typing-extensions==4.11.0 is already installed

I see usePyodide.tsx already fixes this for direct requirements by skipping the installation:

if pkg_name not in micropip.list():

However, this does not work for dependencies.

Micropip 0.10.0 introduced a reinstall parameter to micropip.install which can be used to fix this problem. This parameter also reinstalls dependencies if a newer version is requested.

Is it currently possible to install packages that depend on a newer version of a package already provided by shinylive / Pyodide in a different way? Or will this only be possible when shinylive uses Pyodide 0.28.0 or higher?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions