-
Notifications
You must be signed in to change notification settings - Fork 24
Cannot install packages that depend on a newer version of an already installed package #213
Description
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:
shinylive/src/hooks/usePyodide.tsx
Line 257 in b9160c7
| 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?